This project is read-only.

Project Description
The project allows you to achieve multiple file uploading in Silverlight 4 without complex and complicated code.

Designed for ease of integration with existing projects. The UI in the project is used as an example and should not be used inside other projects.

Differences from other upload mechanisms:

  • Designed for developers. 
  • Simple! Easy to set up, use, extend, and customize. 
  • The code is not cluttered with unnecessary UI.
  • Two core files that do the job. 
  • Designed to be used with BusyIndicator or similar custom status updaters.

Key features of the project include:

  • File upload progress updates.
  • Events for file upload started, file upload stopped, and all files successfully uploaded.
  • Sequential file upload mechanism; GUI remains usable.
  • Option of single or multiple file uploading.
  • Set chunk size to upload.

Example Code:

//An array of files selected by open file dialog box.
//The array may have null elements.
FileInfo[] selectedFiles = ...

//The destination folder on the server.
string DESTINATION_FOLDER = "file_uploads";

//Create a file uploader.
FileUploader fileUploader = new FileUploader();

//Add event handlers for different purposes.
fileUploader.FileUploadStarted += new EventHandler(fileUploader_FileUploadStarted);
fileUploader.AllFilesUploadCompleted += new EventHandler(fileUploader_AllFilesUploadCompleted);
fileUploader.FileUploadProgressChanged += new EventHandler(fileUploader_FileUploadProgressChanged);

//Start the file upload.
fileUploader.UploadFiles(selectedFiles, DESTINATION_FOLDER);

The source contains an example VS2010 Silverlight project.

Last edited Jan 17, 2011 at 1:19 AM by zkhalapyan, version 14