Silverlight Day 5 - 介紹 Silverlight 多檔上傳元件

Silverlight Day 5 - 介紹 Silverlight 多檔上傳元件

在 ASP.Net 2.0 的時候,多半都參考【ASP.NET File Upload 檔案上傳套件】客製多檔案上傳的元件。

亦或是,直接使用其他 AJAX 或是已 Flash 為基礎的上傳套件來達成相同的功能,而我多半都是使用  SWFUpload 元件來實作。

日前,因為 Flash Player 10 Beta 的釋出,曾經讓 SWFUpload 2.1 癱瘓一陣子,必須使用 2.2 版本才能夠運作。

(參考: Flash Player 10 Beta 相關討論)


而隨著 Silverlight 的出現,mpostCodePlex 釋出 Silverlight Multi File Uploader v2.2 多檔案上傳套件,主要特色如下:

Features:

  • Select multiple files to upload (可以一次選擇多檔案上傳)
  • Upload multiple files at the same time  (同時上傳多個檔案)
  • Cancel a single upload, or clear the full list (可取消檔案上傳動作)
  • Shows the overall progress (顯示上傳進度)

For developers: (對於開發者而言,方便性如下:)

  • Full Source Code Included!
  • Configure file extension filter (for example, only .jpg files) (可設定限制上傳檔案類型)
  • Configure maximum file size  (可設定限制單一檔案容量大小)
  • Configure the number of simultaneous uploads (設定單一時間上傳檔案個數)
  • Input for custom parameters
  • Basic webservice included
  • Change the default color by setting a single parameter
  • JavaScript events and properties for integration in your website
  • Choose between WCF Webservice upload or HttpHandler upload
  • Supports PHP! PHP Upload also available using a PHP Upload Handler
  • * Extensible WCF Webservice!
  • * Full WCF Webservice code included
  • * When the file is finished uploading, you can have your custom code executed in the WCF webservice For example: store the file in the database, rename the file, store additional file info in the database, resize uploaded pictures etc etc..
  • * Your custom input parameters are available in the webservice

有興趣的人可參考 Silverlight Multi File Uploader Website ,該網頁有 DEMO 的程式。

另參考執行畫面如下:

 SilverlightMultiFileUploader