Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to add an upload data type directly to a folder in the media section. When I try to add an image to it, I get an asp.net error (below).
Is this not a valid thing to be doing, and/or is there any way around it? I want to have each photo gallery in a folder, and assign a thumbnail for each gallery to the folder. Here's the error:
Parameter is not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Parameter is not valid.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[ArgumentException: Parameter is not valid.] System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +435 System.Drawing.Image.FromStream(Stream stream) +14 umbraco.editorControls.uploadField.Save() +4583 umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e) +397 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +134 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
Where will the thumbnail be shown? I'm assuming for the visitors browsing your site? So you have a gallery overview page which has a thumbnail image for representing each gallery, and the visitor clicks the thumbnail to go to that particular gallery??
There may be other methods, but what I would do is use normal folders in the media section to group the galleries. Modify the image datatype to add a new true/false property called UseForGalleryThumbnail (or whatever) then in each gallery sub-folder, pick a thumbnail image by ticking that option.
Then when you create your "galleries" page macro you can parse the folders for images with that property and display the thumbnail version of the image which is automatically created by umbraco when you upload/save the image.
You can change the width of the thumbnail created in the Upload datatype. Separate multiple sizes with semicolon. The resulting image will be called [filename]_thumb[width here if you have multiple].jpg. Alternatively, you could use the ImageGen package, which generates thumbnails on the fly.
Hopefully I've got the right idea of what you're trying to do!
That's exactly how I need it to work, yes.
I have it set up how you suggested, and that works great. The only downside is with my XSLT. I feel like it's a bit more convoluted than it needs to be. That's something I can look at optimizing later though.
really appreciate the help, thanks again.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted