Resizing an Image Uploaded using Upload File control

Celero Solutions asked on June 18, 2014 15:44

Hi, I'm using Kentico 7 and I have a Bizform that allows the user to upload an image using the Upload File control. I can successfully retrieve the file using GetBizFormFile.aspx but I will need to be able have the image resized. I like the way GetFile.aspx allows for query string parameters to resize the image But it doesn't appear that I can use GetFile.aspx to retrieve files uploaded using the Upload File control (correct me if I'm wrong). FYI, I'm not using the Image Selection control because I just want the user to choose a file from their computer and I don't want them to see the other files/folders on the site.

How do I have Kentico resize the image that was uploaded using the Upload File control?


Recent Answers

Joshua Adams answered on June 19, 2014 09:06

What is the purpose of you trying to resize it? If it is controlling the maximum size, there are settings in the control and site settings that can control the max size.

0 votesVote for this answer Mark as a Correct answer

Celero Solutions answered on June 19, 2014 10:05

The purpose is to be able to retrieve a thumbnail version of the image. I ended up making my own version of GetBizFormFile which accepts parameters that specify the desired dimensions of the thumbnail. Then I made use of ImageHelper's EnsureImageDimensions and GetResizedImageData methods to help me resize it. Thanks.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.