The Silverlight File Uploader is a Silverlight 2 control (compatible with Silverlight 2, 3, and 4) for uploading multiple files concurrently. This is the most flexible, user-friendly, developer-friendly, well-documented and tested Silverlight uploader project on CodePlex.
More so than the other open-source Silverlight uploaders out there, this project is focused on providing a control that is easy to slot into your application with minimal effort. It provides more detailed examples, help, and code comments. It provides more information for server-side handling of the files, and has a stronger focus on robust error handling.
In addition to downloading the example, I have created a short user's guide for this control. Follow the link below to see the guide.Example Usage
Update: I have added an additional guide, Integrating with an Existing Website
, which describes how to integrate this control into an existing website.
- User-friendly UI with progress bars
- Upload any number of files simultaneously
- Upload files of any size
- Allow users to select multiple files or just a single file
- Limit which file types a user can select via a standard file filter
- Set the maximum file size that a user is allowed to upload
- Manage the list of files as they are being uploaded: cancel an uploading file, or remove a pending file before it has begun uploading
- Very fast -- implemented using an http handler to upload files; the maximum number of concurrent uploads can be configured and defaults to 2
- Uploads each file in chunks; defaults to 3 MB, but can be changed to any value that you feel is appropriate
- Has a web server control that makes it very easy to use in ASP.NET applications
- Easy server-side post-processing of files, see Example Usage for more details
- Complete working example solution
- Extra support is built in for using this control with an ASP.NET server application, but the Silverlight control is completely generic and will work with PHP or any of your favorite server technologies
Here is a screenshot of what the file uploader looks like in action:
Comparison of Open-Source Silverlight Uploaders
There are two other open-source uploaders on CodePlex as of the creation of this project -- what is different about them?
- All of the other examples that I have found give you a basic example of uploading files into a directory on the server... and that's it. This is not a very realistic situation -- you almost always want to process the files, put them into a database, create thumbnails, etc. Our project is designed to make it easier to slot this control directly into your application's architecture with minimal effort.
- None of the other examples have very good documentation or comments in the code.
- The other examples have a less streamlined user experience that requires extra clicks.
Here are some more detailed notes on the other CodePlex projects:
- http://slfileupload.codeplex.com/ This project is a great example of the basic techniques required, and I used it as a reference for this project. Unfortunately it has some bugs, and the Silverlight UI is not very presentable. It is NOT stable enough for use in a production environment.
- http://silverlightfileupld.codeplex.com/ This project is more similar to our project, and adds a feature to resize images prior to uploading. While that feature is nice, it suffers from the general weaknesses noted above. Its handling of the user's files allows some potential issues as well -- a user could potentially delete a file in the middle of a download.
About the Authors
This project was written by Peter Coley of Virtual Chemistry, Inc. (VCI) http://www.virtualchemistry.com
VCI specializes in using .NET, Silverlight, SharePoint, and more to solve tough problems in web-based data management.