Upload files problem

5 posts, 0 answers
  1. lee
    lee avatar
    20 posts
    Member since:
    Aug 2007

    Posted 19 Nov 2007 Link to this post

    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
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 20 Nov 2007 Link to this post

    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

  3. lee
    lee avatar
    20 posts
    Member since:
    Aug 2007

    Posted 22 Nov 2007 Link to this post

    Thank you for fastly support.
  4. lee
    lee avatar
    20 posts
    Member since:
    Aug 2007

    Posted 23 Nov 2007 Link to this post

    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
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Nov 2007 Link to this post

    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
Back to Top