Originally Posted by
Daniil
Hi @hdsoso,
No, it doesn't.
There is a MultiUpload control in the trunk. It is based on Flash. The examples you can find in the trunk's Examples Explorer, in the MultiUpload folder.
i update the svn and can not find example code of uploading files to servers , could you please give me an example?
<ext:FieldContainer runat="server" LabelWidth="65" Margin="4" FieldLabel="上传图片">
<Items>
<ext:MultiUpload runat="server" ID="mu_1" OnFileUpload="MultiUpload1_FileUpload"
AutoStartUpload="true"
FileDropAnywhere="true"
FileSizeLimit="15 MB"
FileTypes="*.*"
FileTypesDescription="All Files"
FileUploadLimit="100"
FileQueueLimit="0">
<Listeners>
<UploadStart Handler="Ext.Msg.wait('上传中');" />
<UploadComplete Handler="Ext.Msg.hide();" />
</Listeners>
</ext:MultiUpload>
</Items>
</ext:FieldContainer>
protected void MultiUpload1_FileUpload(object sender, FileUploadEventArgs e)
{
var fname = this.mu_1.FilePostName;
var flength = this.mu_1.FileQueueLimit;
var ran = new Random();
string sNewName = DateTime.Now.ToString(@"yyyy-MM-dd-HH-mm-ss") + ran.Next(100, 999)
+ Path.GetExtension(fname);
var y = System.DateTime.Now.Year.ToString(CultureInfo.InvariantCulture);
var m = System.DateTime.Now.Month.ToString(CultureInfo.InvariantCulture);
string strPath = HttpContext.Current.Server.MapPath("/Uploads/" + y + "/" + m + "/" + sNewName);
string pathMoth = HttpContext.Current.Server.MapPath("/Uploads/" + y + "/" + m);
string webPath = "/Uploads/" + y + "/" + m + "/" + sNewName;
if (!Directory.Exists(pathMoth))
{
Directory.CreateDirectory(pathMoth);
}
// this.mu_1..PostedFile.SaveAs(strPath);
// here how to save the file to the server???
var img = "<img src='" + webPath + "'/>";
he_cont.SetValue(he_cont.Text + img);
}