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

OnClientValidationFailed function for checking if failure due to file being uploaded is open

1 Answer 62 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 14 Mar 2013, 08:12 PM
Hi, I am using the RadAsyncUpload without enabling plugins, so I am using straight-up javascript on my page. In other words I have the property DisablePlugins="True".

My problem is that I can not distinguish the reason for error when the user atempts to upload a file that happens to be open at the time of the upload attempt, essentially this is a file-sharing error.

I know that you can distinguish the difference from the wrong extension and the max size errors by this post:

http://www.telerik.com/help/aspnet-ajax/asyncupload-onclientvalidationfailed.html

I cannot, however, find javascript code that will distinguish these two possible errors:

1) wrong extension
2) max file size

...as well as

3) file-sharing (while the file is open and upload attempted on it)

All three at once.

???

There seem to be solutions if you are using Silverlight, but if you are not, you do not have access to same objects and properties that you would if I was assuming the use of Silverlight.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 19 Mar 2013, 02:09 PM
Hello,

 
In such scenarios we recommend using OnClientFileUploadFailed event, check the error message you are getting and do your custom functionality after that.

I have tested the scenario described with DisablePlugins with .docx file opened in the same time in Word by could not achieve any error. Would you please elaborate a little bit what kind of file are you using to observe the issue so we could be more helpful?

Kind regards,
Plamen
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
JJ
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or