Home

Introducing the Open Source AjaxSafeUpload control for ASP.NET

What is it?

  • A control that can replace the old asp:FileUpload control (possibly without changing the code behind).

What new does it offer?

  • Complete styling of the upload button with HTML and CSS, and styling of a list of uploads with CSS. The list of files and upload progress indicator is fairly compact, since you are probably doing other stuff on your page that is much more important than displaying fancy graphics for an uploader.
  • Can be localized / translated (comes with English and Danish).
  • Property Multiple=”true” enables upload of multiple files!
  • Property AllowedFileCategory gives different texts and upload handling for images, documents and other general files. When the image category is used the uploaded images will automatically be resized for use on the internet (that is: users can upload a 16MB jpg from their expensive digital camera, but it will be saved in much lower resolution).
  • It can be put inside an asp:UpdatePanel and does not require full postback!!! This allows you to use the AjaxSafeUpload control on a form with validation controls – uploaded files are remembered between postbacks, so the user can correct his input without losing the uploaded file(s).
  • Can be initialized with previously uploaded files. This allows you to use it for editing files that was uploaded earlier – users can upload and remove files from the list, without really changing anything before your program handles your own save or cancel buttons.
  • Works with ASP.NET 3.5 and 4.0, works with Web Applications as well as the older websites model, works in web gardens/farms (note: not yet tested), works with DotNetNuke (and probably other CMS systems too), also works when the web applications is in a subdirectory, and most likely it will work with the ASP.NET websites you have programmed!
  • Does not use Flash - only JavaScript and easily styled HTML.
  • Provides fairly high security against misuse!
  • New in v0.9.5: When compiled in debug mode you get informative error messages in the response, so you can see what when wrong when uploading a file. Uploads will also be delayed a few seconds to give you possibility to see and style the design of the progress indicator despite testing locally.
  • New in v0.9.5: New security model - uploads will not be accepted unless they match an active control on one of your pages and match the type of files that control wants, and you can on each control specify the dimensions that uploaded images should be scaled to, and the max size of uploads.
  • New in v0.9.6: Control will nicely degrade to informative text if uploading of files is impossible due to no JavaScript or uploading not supported (iPhone & iPad does not support uploading files on websites).
  • New in v0.9.9: Added legacy mode for displaying the browser's native upload control for those (few) browsers where styling simply did not work.
  • New in v0.10.0: Session state + file alternative that does not require a database table, but is still just as secure as before.
  • New in v0.10.0: File storage even for the database model when the file is bigger than what you want in your database, and late loading of binary data (so that all the files does not have to be loaded into memory just to render a list of file names and sizes in partial postbacks with validation errors).
  • New in v0.10.0: Even more customization to your desires.
  • New in v1.0.0: Feature complete - server side checks passes nice error messages back to the user, both with and without legacy mode. (Plus misc. bugfixes for even more browser compatibility.)

For more information about how it looks and how to use it, look at: http://www.kindbergs.dk/ajax-safe-uploader.aspx

Project Admins: