Hi, after so much luck with my last request, I thought I'd ask for another tip. This must be possible with Umbraco 4.0.3. I am experienced with ASP.NET 3.5/Ajax and have a couple of days experience with Umbraco, so the answer can be terse.
I need to have a user input an image file name in a page (got that using CWS_Photo variant :-) and then use the full path of this stored gallery photo to construct a page which then opens in a separate browser window. This would be simple using standard ASPX and pulling the name and path of the photo from a DB or wherever and construct the page (I do not want it to appear in the query string unless it is encrypted). So how to I get at this path in Umbraco, and how to I construct and start a complete ASPX or HTML page. If I have a URL, then I can simply use js window.open(url...), but the URL must point the the constructed page... I feel like all the pieces are there, but I can't get at the path and only see how to build ascx, not aspx.OK, the templates are x.master, so could I just create a x.cs.master by hand...?
Any ideas how to get this done without exposing the path to the media object in a query string?
To easily get the ID of a media item, it may be wise to store it in the media library and use a mediaPicker. As far as I remember, an upload field just stores the path to the file. Could be wrong though, it's been a while since I used it!
Hmm, I'm new to this and I read all over the place about "pickers" but I'm not even sure what is special about them and how they work. Two things: 1. the user is uploading a file from somewhere. I already use a file broswer to find the "upload path", what is a media picker in this context? 2. Any examples around?
Thanks! Well, the media picker souns almost like a workaround here, but I need to learn it anyway... so, I began by trying to upload a 6 MB mpeg4 file using the same upload control that works fine for images. Firefox V3.6 crashed (many times). Do I need to use another uploader? I think I may go for the query string after all :-)
uploading 6mb mpeg4 won't be supported by default, as your web.config is probably configured to only allow uploads up to 2mb's (can be machine.config as well if not defined in web.config). You can however raise the bar and set it to allow uploads of 10mb, or whatever size you like (there's a max which I don't know by heart...). Check this as a reference on how to allow larger uploads.
Open external window using templated page?
Hi, after so much luck with my last request, I thought I'd ask for another tip. This must be possible with Umbraco 4.0.3. I am experienced with ASP.NET 3.5/Ajax and have a couple of days experience with Umbraco, so the answer can be terse.
I need to have a user input an image file name in a page (got that using CWS_Photo variant :-) and then use the full path of this stored gallery photo to construct a page which then opens in a separate browser window. This would be simple using standard ASPX and pulling the name and path of the photo from a DB or wherever and construct the page (I do not want it to appear in the query string unless it is encrypted). So how to I get at this path in Umbraco, and how to I construct and start a complete ASPX or HTML page. If I have a URL, then I can simply use js window.open(url...), but the URL must point the the constructed page... I feel like all the pieces are there, but I can't get at the path and only see how to build ascx, not aspx.OK, the templates are x.master, so could I just create a x.cs.master by hand...?
Any ideas how to get this done without exposing the path to the media object in a query string?
Thanks!
Richard
You could simply pass the ID of the media object in the query string? and then use the GetMedia function in the umbraco library (http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/GetMedia)
Looks good. Where do I get the ID of the media object? The properties defined in the Photo document type are photoText and photo (Upload).
Thanks!
R
To easily get the ID of a media item, it may be wise to store it in the media library and use a mediaPicker. As far as I remember, an upload field just stores the path to the file. Could be wrong though, it's been a while since I used it!
Dan
Yes the upload field just stores the path to the file so the media picker is the way to go.
/Jan
Hmm, I'm new to this and I read all over the place about "pickers" but I'm not even sure what is special about them and how they work. Two things: 1. the user is uploading a file from somewhere. I already use a file broswer to find the "upload path", what is a media picker in this context? 2. Any examples around?
Thanks!
R
If you're going to use the Media Picker approach you need to upload your images etc. to the media library in Umbraco.
When you have done that you can choose it from the content section on a document type where you have placed the media picker property.
When you then pick an image from the media library the media picker holds the id value that you need to accomplish your task.
I hope this helps.
/Jan
Also worth a look: http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/
Thanks! Well, the media picker souns almost like a workaround here, but I need to learn it anyway... so, I began by trying to upload a 6 MB mpeg4 file using the same upload control that works fine for images. Firefox V3.6 crashed (many times). Do I need to use another uploader? I think I may go for the query string after all :-)
Richard
Richard,
uploading 6mb mpeg4 won't be supported by default, as your web.config is probably configured to only allow uploads up to 2mb's (can be machine.config as well if not defined in web.config). You can however raise the bar and set it to allow uploads of 10mb, or whatever size you like (there's a max which I don't know by heart...). Check this as a reference on how to allow larger uploads.
Hope this helps.
Regards,
/Dirk
is working on a reply...