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

Upload files problem

4 Answers 107 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
lee
Top achievements
Rank 1
lee asked on 19 Nov 2007, 08:46 AM
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

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 20 Nov 2007, 04:15 PM
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
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
0
Georgi Tunev
Telerik team
answered on 26 Nov 2007, 01:49 PM
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
Tags
WebParts for SharePoint
Asked by
lee
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
lee
Top achievements
Rank 1
Share this question
or