1

I'm working on user image upload in ASP.net, I want to know what is the best practice followed in image heavy web application design

Before uploading i've to shrink the size and store all the image on Amazon at once

2 Answers 2

1

I would use a queueing mechanism to break out your upload process into steps that can execute separately.

  • Step 1: Upload and save file to disk (or Amazon)
  • Step 2: Process the image and resize
  • Step 3: Have a process upload modification to Amazon and update your domain
  • Step 4: A clean up process (optional) for local files.

I want to note that processing an image outside of the ASP.NET process is most optimal since image modification can be a process hog.

Breaking out processing into steps will help you diagnose issues in your process much easier as it will be obvious where things are broken.

Just my 2 cents :)

Sign up to request clarification or add additional context in comments.

2 Comments

@roman your inputs helped, what i did is i resized the images and stored on server for temporary basis and created a windows services which basically looks at file in the folder and get uploaded in the background, I'm yet to write the controller for re-direction on temporary or permanent URL.
I used Amazon s3 for this and write simple blog also on this wukilabs.com/blog/2014/01/amazon-file-upload
0

It depends only on your business requirements. But keep in mind once the image is stored on amazon, it has an unique url. If you need a smaller image, you have to upload another one. It's up to you to decide when you want to upload a smaller image:

  • At the same time with original image
  • Resize original image and upload newer one on the first request

But in the second case you simply can't follow the user to amazon's url, because the image doesn't exist at the moment. So you have to handle it somehow, maybe make a redirection url on your website.

Anyway, the most simpler and painless way to do this is just to create all the necessary images at the same time when you uploading your original image.

1 Comment

I think i'll upload the original and the other thumbnail at the same time and refer the URL. Can you help with some article in ASP.net MVC, I'm sure lot of people have done that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.