This is a migrated thread and some comments may be shown as answers.

Uploaded file missing

5 Answers 71 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 24 Sep 2010, 01:13 PM

I’ve got problem with uploading files. When I upload at least 2 files (and one is much larger then the other) I got only one file uploaded (the bigger one).

Example: I try to upload 3 file

  • FileOne (15KB)
  • FileTwoBig (10MB)
  • FileThree (12KB)
When IsNewFileRequest() in RadUploadHandler  is true for the first time the GetFileName() returns “FileTwoBig” (not “FileOne”). Next time (when IsNewFileRequest() is true) the GetFileName() returns “FileThree”. Request.Files.Count is one or two (never three). When UploadFinished event fires the (sender as RadUpload).CurrentSession.UploadedFiles.Count is three, but in RadUploadHandler I never had a chance to process the “FileOne” file and it is not uploaded.
If you can’t reproduce this, could you post sample code for RadUploadHandler where saving files on the server works?
Thank you

5 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 28 Sep 2010, 11:34 AM
Hi Andrew,

Please find the attached project demonstrating how large and small files can be uploaded with the RadUpload. I tested your scenario by uploading one small, one large and another small file. The files are uploaded, however, the UI does not reflect the progress changes correctly. We are already working on resolving this issue : "When uploading multiple small files and one large file the progress of the loading is incorrect". You will be able to track it in our PITS from tomorrow the latest.

Regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 29 Sep 2010, 07:57 AM
Thank you for your response. I checked attached project, but it is not what I need.

I want to do something on a server side with uploaded files, so I need to know which files were uploaded. Can I do this in the RadUploadHandler?

I tried few things:

private static List<string> files = null;
if (this.IsNewFileRequest())
{
   if (files == null)
      files = new List<string>();
 
   files.Add(this.GetFileName());
}
 
if (this.IsFinalFileRequest() || this.IsFinalUploadRequest())
{
   for (int i = 0; i < files.Count; i++)
   {
      // Do something
   }
}

When I upload 3 files (with different sizes) the files list contains only 2 items (first small file is missing).

I also tried to use this.Request.Files but this.Request.Files.Count is 1 or 2 (never 3).

What can I do to get all 3 files on a server side?

0
Alex Fidanov
Telerik team
answered on 01 Oct 2010, 12:31 PM
Hi Andrew,

Currently this is because the file chuncks that are sent over to the server are being grouped together. The small file is included in the chunck of the large one and that is why you are not seeing it as a separate request. We have already logged this in our PITS under the name "Incorrect upload notifications when uploading small and large files". The item should be available for tracking from tomorrow the latest.

As a temporary way around this you could be monitoring the target folder and its files count.

Regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrew
Top achievements
Rank 1
answered on 17 Jun 2011, 10:25 AM
I am using RadControls for Silverlight Q1 2011 SP1 (Telerik.Windows.RadUploadHandler version: 2010.2.714.35) and the problem is still there. I don’t see small file on the server. IsNewFileRequest() is true only for bigger files (the same code as above).
0
Petar Mladenov
Telerik team
answered on 22 Jun 2011, 01:43 PM
Hi Andrew,

This issue is resolved with the Official Q3 2010 version of RadControls (1110).

Greetings,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Upload
Asked by
Andrew
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Andrew
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or