0 Byte Files

6 posts, 0 answers
  1. Jeff Paetkau
    Jeff Paetkau avatar
    35 posts
    Member since:
    Jun 2012

    Posted 08 Dec 2011 Link to this post

    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

     


  2. Bozhidar
    Admin
    Bozhidar avatar
    1189 posts

    Posted 12 Dec 2011 Link to this post

    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
  3. Jeff Paetkau
    Jeff Paetkau avatar
    35 posts
    Member since:
    Jun 2012

    Posted 12 Dec 2011 Link to this post

    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
  4. Bozhidar
    Admin
    Bozhidar avatar
    1189 posts

    Posted 13 Dec 2011 Link to this post

    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
  5. Jeff Paetkau
    Jeff Paetkau avatar
    35 posts
    Member since:
    Jun 2012

    Posted 13 Dec 2011 Link to this post

    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
  6. Bozhidar
    Admin
    Bozhidar avatar
    1189 posts

    Posted 14 Dec 2011 Link to this post

    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
Back to Top