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

Accsasing a file before upload

3 Answers 34 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Oren
Top achievements
Rank 1
Oren asked on 26 Aug 2013, 02:59 PM
Hello, i want to use the radUpload control but before i starting building i need to do if the control supports the feature I'm looking for:

i want to know if i can access the file that is about to upload before the actual upload part,
For example i want to check an attribiute of the meta-data of a movie file for some kind of value and only if it match i want to allow it to be uploaded, is it possible to do with this control?

Thanks,
Oren.

3 Answers, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 29 Aug 2013, 02:19 PM
Hello Oren,

You could use the build in validation of the RadUpload where you have access to the current RadUploadItem. You can find more information about this approach in this article.
However you can not stop file from uploading based on meta-data located in the Request Header. Because once the upload button is pressed and the session is started all files move through the validation which assures the correctness of the files. Also once the session is started you can only pause or cancel the session, you can not modify the Items collection.

I hope this information helps.

Kind regards,
Kiril Vandov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Oren
Top achievements
Rank 1
answered on 02 Sep 2013, 02:30 PM
Hello Kiril,
thank you for your replay,
However, i am still not clear about the answer so ill ask it another way.

lets say i want my user to upload a bunch of text files (*.txt),
However i only want to allow them to upload files that end with the sentence "thank you", (not the file name, the actual file).
Is there a way to do so with this control?
or my only option is to let him upload the file, and after the file is in my server, check for the sentence?

Kind regards,
Oren.
0
Kiril Vandov
Telerik team
answered on 04 Sep 2013, 08:49 AM
Hello Oren,

Unfortunately the RadUpload does not support such kind of file validation. You need to upload the file first and then check its content on server side.

Please let us know if you have further questions.

Kind regards,
Kiril Vandov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Upload
Asked by
Oren
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Oren
Top achievements
Rank 1
Share this question
or