Initial parameters

Dec 17, 2009 at 9:24 AM

First - test project is working great, nice work.

Requires to set FullTrust for this app - this is not so good.

Questions:

1. How do I set the file size - I want to limit uploading big files, and want this to be done BEFORE file is uploaded?

2. How do I limit to one file upload only - instead of multiple files?

Using test project with:

 asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/FileUpload.xap" MinimumVersion="2.0.31005.0" Width="100%" Height="100%" InitParameters="UploadPage=FileUpload.ashx,Filter=Images (*.jpg)|*.jpg" />

 

Regards,

 

Ron Shani

 

Dec 17, 2009 at 2:15 PM

well - this is a reply to myself - but this is easy...

all is defined in MultiFileUploadControl.cs

here is an example:

<DC:MultiFileUploadControl runat="server" ID="fileUpload" Width="500" Height="500"
            UploadPage="~/FileUpload.ashx" JavascriptCompleteFunction="OnComplete" MaxNumberToUpload="5"
            AllowThumbnail="True" MaximumTotalUpload="1000000" MaximumUpload="1000000" Multiselect="True"
            MaxConcurrentUploads="2" ResizeImage="True" ImageSize="500" Filter="Images (*.jpg;*.gif)|*.jpg;*.gif|All Files (*.*)|*.*" />