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

0 Byte Files

5 Answers 84 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jeff Paetkau
Top achievements
Rank 1
Jeff Paetkau asked on 08 Dec 2011, 06:42 PM
Hi,

In a particular usage scenario my uploaded files are 0 byte files after upload using Rad Async Upload.

I have built a simple utility that will take multiple logos, trim the white-space and re-size the image to be x number of pixels. The utility utilizes Rad Async Upload to handle uploading the files and it works fine as long as all the images are in the same folder.

However, we have a folder setup somewhat like the following:

Logos
   Client Name One
      Client Name One.ai
      Client Name One.eps
      Client Name One.pdf
      Client Name One.png
      Client Name One.jpg 
   Client Name Two
      Client Name Two.ai
      Client Name Two.eps
      Client Name Two.pdf
      Client Name Two.png
      Client Name Two.jpg
 
  etc.


So say I want to re-size all the jpg logos to be 10,000 pixels to go on the clients section of the website. Using Chrome 16 on Windows Vista I:
  1. Open Up my utility and enter 10,000
  2. Click on the "Select" button generated by Rad Async Upload
  3. In the top right search box search for *
  4. Stack the results by type checking "JPEG Image"
  5. Select the 2 or more images to upload
  6. Do a postback
  7. The first image is processed correctly
  8. The second image throws an error because it is 0 Bytes

Please let me know if you need more information to reproduce.

Jeff Paetkau

 


5 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Dec 2011, 04:51 PM
Hello Jeff Paetkau,

This is a limitation comes from the input HTML tag, that RadAsyncUpload uses. Unfortunatelly you can only choose files from one folder with each open dialog. 

Greetings,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Jeff Paetkau
Top achievements
Rank 1
answered on 12 Dec 2011, 07:44 PM
Hi Bozhidar,

Thank you for the information.

Is this defined behavior in the HTML5 specs or is it a bug in the browser implementations?

Perhaps RadAsyncUpload could at least handle this failure with a meaningful error message.

Jeff Paetkau
0
Bozhidar
Telerik team
answered on 13 Dec 2011, 02:36 PM
Hello Jeff Paetkau,

This behaviour is a limitation of the HTML input tag, rather than a bug. It works the same way in all the browsers I tested it on. You can try it yourself - just add <input type="file" multiple /> to your page and you'll observe the same behaviour. When you select files from different folders, it should show a popup message, telling you why you can't select these files, so there isn't a need for RadAsyncUpload to handle the error. Please see the attached image.

Best wishes,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Jeff Paetkau
Top achievements
Rank 1
answered on 13 Dec 2011, 06:29 PM
Hi Bozhidar  ,

The spec (http://dev.w3.org/html5/spec/Overview.html#file-upload-state) does not appear to codify this limitation. However, you are correct that all current browsers do in fact have this limitation in their implementation.

Unfortunately, I do not see the error message in your screenshot in either Firefox 6 or Chrome 16 on Windows Vista.

Thank you for your help.

Jeff Paetkau
0
Bozhidar
Telerik team
answered on 14 Dec 2011, 02:11 PM
Hi Jeff Paetkau,

We've managed to reproduce the issue under Windows Vista. 
However, this is a problem with the HTML tag and the operating system and there isn't a way for RadAsyncUpload to handle it.
Excuse us for any inconvenience caused. 

Best wishes,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
AsyncUpload
Asked by
Jeff Paetkau
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Jeff Paetkau
Top achievements
Rank 1
Share this question
or