This question is locked. New answers and comments are not allowed.
Silverlight code:
Handler code:
Uploader sending files to server with some additional information. Silverlight part works good - all data being sended.
The problem is in handler part. In method ProcessStream either IsFinalFileRequest() or just simple collection requests (like in my code) doesn't work. Some of file never got "called" via processStream method. What is strange the file is in uploader temporary folder - but it's locked for delete and manipulation. So seems like some file object isn't closed.
Any advice. How to properly collect all sended files?
Silverlight version: 2011.3.1220.1040
Server side dll version: 2011.3.1116.35
regards
<
telerik:RadUpload
Grid.Column
=
"1"
x:Name
=
"RadUpload"
Margin
=
"8 0 8 0"
Filter
=
"PDF Files (*.pdf)|*.pdf|Excel Files (*.xls)|*.xls|All Files(*.*)|*.*"
FilterIndex
=
"0"
MaxFileCount
=
"50"
AllowDrop
=
"true"
Width
=
"340"
IsAutomaticUpload
=
"false"
OverwriteExistingFiles
=
"True"
UploadServiceUrl
=
"UploaderHandler.ashx"
TargetFolder
=
"~/Content/Uploader/"
HorizontalAlignment
=
"Left"
MaxFileSize
=
"2147483647"
MaxUploadSize
=
"2147483647"
FileUploadStarting
=
"RadUpload_FileUploadStarting"
/>
Handler code:
public class UploaderHandler : RadUploadHandler
{
private class FileDesc
{
public string FilePath { get; set; }
public int LanguageId { get; set; }
public int AdministratorId { get; set; }
public int CategoryId { get; set; }
}
private static List<
FileDesc
> _fileDescs = new List<
FileDesc
>();
public override void ProcessStream()
{
base.ProcessStream();
if (_fileDescs.Where(fd => fd.FilePath == GetFilePath()).Count() == 0)
{
_fileDescs.Add(new FileDesc()
{
FilePath = GetFilePath(),
AdministratorId = Convert.ToInt32(GetQueryParameter("AdministratorId")),
LanguageId = Convert.ToInt32(GetQueryParameter("LanguageId")),
CategoryId = Convert.ToInt32(GetQueryParameter("CategoryId"))
});
}
if (IsFinalUploadRequest())
{
[some code]
}
}
}
Uploader sending files to server with some additional information. Silverlight part works good - all data being sended.
The problem is in handler part. In method ProcessStream either IsFinalFileRequest() or just simple collection requests (like in my code) doesn't work. Some of file never got "called" via processStream method. What is strange the file is in uploader temporary folder - but it's locked for delete and manipulation. So seems like some file object isn't closed.
Any advice. How to properly collect all sended files?
Silverlight version: 2011.3.1220.1040
Server side dll version: 2011.3.1116.35
regards