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

RadAsyncUpload Check File Headers before saving file

3 Answers 104 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 01 Mar 2012, 10:35 PM
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!

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Mar 2012, 05:53 PM
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.
0
zykes
Top achievements
Rank 1
answered on 03 Dec 2013, 05:28 AM
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?

0
Plamen
Telerik team
answered on 05 Dec 2013, 01:35 PM
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.
Tags
AsyncUpload
Asked by
Edward
Top achievements
Rank 1
Answers by
Plamen
Telerik team
zykes
Top achievements
Rank 1
Share this question
or