RadAsyncUpload Check File Headers before saving file

4 posts, 0 answers
  1. Edward
    Edward avatar
    12 posts
    Member since:
    Sep 2012

    Posted 01 Mar 2012 Link to this post

    I'd like to check the first few bytes of a file that is being uploaded to ensure that it is actually of the type specified in its file exstension.
    Is there any built-in functionality  or recommended way of doing this with a RadAsyncUpload control?
    Thanks!
  2. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 06 Mar 2012 Link to this post

    Hello Edward,

     
    Generally this scenario is not supported by RadAsyncUpload, but you can implement such functionality only by using the File Api upload module. This is possible when you handle the onClientFileUploading event and read the file from the get_row() property as shown in this forum.

    Hope this will help you.

    Kind regards,
    Plamen Zdravkov
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. zykes
    zykes avatar
    2 posts
    Member since:
    Jun 2011

    Posted 02 Dec 2013 Link to this post

    Hi,

    Any update on this one? like the question above, I wanted to check whether the file to be uploaded is valid. What if the file extension is just changed to the accepted file extension, how can the control validate the file to be uploaded?

  5. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 05 Dec 2013 Link to this post

    Hi,

    Unfortunately this is a browser limitation and can be achieve only with the browser that support file api upload. Getting such information in the other upload module is not a supported scenario.

    Regards,
    Plamen
    Telerik
    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 the blog feed now.
Back to Top