I am creating an image management tool and I want to know how I can create a vimeo-like experience.
Description of what is about to happen
The user will be able to upload many potentially large images using plupload (without reloading the page). Then the server will perform the following actions for each uploaded image.
- The image will be changed to several versions (for example, large, small, medium, large)
- Each copy will have some image processing (e.g. convolution filter)
- These copy changes will be uploaded to Amazon S3
- Information about each image will be saved to the database (width, height, mimetype, filename)
- Then the server should cause some user feedback.
Providing Asynchronous Feedback
Plupload (a tool for downloading images) has a really nice visual feedback when uploading files to my server, however I want to be able to give additional feedback to the user while the server is doing all the image processing and uploading to the remote storage.
Vimeo does it beautifully. When you upload a video, it confirms that it has been downloaded, but then says: โWe are encoding your video, wait,โ and the user interface gives some kind of progress indicator.
I would like to give the user two kinds of feedback after the images have been uploaded to my server. Every time an image is processed and uploaded to S3, I would like to:
- Update the message in the browser โ5 of 15 images were processedโ and I would like to
- A thumbnail of this image will appear.
Example action of an MVC controller
[HttpPost] public virtual ContentResult Upload(Guid albumId) { foreach (string file in Request.Files) { HttpPostedFileBase f = Request.Files[file] as HttpPostedFileBase; if (f.ContentLength == 0) continue; var uploadDir = Server.MapPath("~/uploads/"+ albumId); var filePath = Path.Combine(uploadDir, Path.GetFileName(hpf.FileName)); f.SaveAs(filePath);
Limitations
People using this web application will use the latest version of Chrome. No cross browser issues. We are using asp.net MVC 3 and SQL Server 2005
Can someone point me in the right direction? Are there any great resources to show how I can accomplish something like this?
asynchronous asp.net-mvc asp.net-mvc-3
jessegavin
source share