Hi,
I found a problem that when I try uploading files by Document Manager Dialog and their extension is not allowed to be uploaded by sharepoint so that sharepoint throw an exception about it. But your control didn't handle the exception so the "server error :The following file(S) have been blocked by the administrator : List/Doc/test.bat" message is occured. but I want you handling the exception and show to user in your way.
Thanks
I found a problem that when I try uploading files by Document Manager Dialog and their extension is not allowed to be uploaded by sharepoint so that sharepoint throw an exception about it. But your control didn't handle the exception so the "server error :The following file(S) have been blocked by the administrator : List/Doc/test.bat" message is occured. but I want you handling the exception and show to user in your way.
Thanks
4 Answers, 1 is accepted
0
Hello lee,
In this case, you will need to provide custom filters for the allowed file types by modifying the ConfigFile.xml and adding the DocumentFilters property:
<property name="DocumentsFilters">
<item>*.doc</item>
<item>*.pdf</item>
</property>
Add all file extensions that you need. After that if the user tries to upload a different file type from the allowed ones, he will get the alert message and not the exception.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In this case, you will need to provide custom filters for the allowed file types by modifying the ConfigFile.xml and adding the DocumentFilters property:
<property name="DocumentsFilters">
<item>*.doc</item>
<item>*.pdf</item>
</property>
Add all file extensions that you need. After that if the user tries to upload a different file type from the allowed ones, he will get the alert message and not the exception.
Kind regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
lee
Top achievements
Rank 1
answered on 22 Nov 2007, 10:12 AM
Thank you for fastly support.
0
lee
Top achievements
Rank 1
answered on 23 Nov 2007, 10:32 AM
Hi,
I surely want to allow uploading any extension of files except the extensions that sharepoint doesn't allow. but the point is that i don't know entire extension that sharepoint accepts and i don't want to add all list of all extension that sharepoint allow because many new extensions is created all the time. So for now i just want you handle the exception that shrepoint throw when i try uploading the blocked extension of sharepoint and no any configuration is required. i just use the default configuration ("*.*")
Or you got a better idea.
Regards,
Lee
I surely want to allow uploading any extension of files except the extensions that sharepoint doesn't allow. but the point is that i don't know entire extension that sharepoint accepts and i don't want to add all list of all extension that sharepoint allow because many new extensions is created all the time. So for now i just want you handle the exception that shrepoint throw when i try uploading the blocked extension of sharepoint and no any configuration is required. i just use the default configuration ("*.*")
Or you got a better idea.
Regards,
Lee
0
Hello Lee,
I am afraid we cannot do this as we don't have a direct access to the Sharepoint server code from where this exception is thrown. You can check the file extensions that Sharepoint blocks by default here http://office.microsoft.com/en-us/winsharepointadmin/HA011608011033.aspx and build your logic upon that.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I am afraid we cannot do this as we don't have a direct access to the Sharepoint server code from where this exception is thrown. You can check the file extensions that Sharepoint blocks by default here http://office.microsoft.com/en-us/winsharepointadmin/HA011608011033.aspx and build your logic upon that.
Regards,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center