none
Can we restrict specific file type uploading on sharepoint library? RRS feed

  • Question

  • I know we can block specific file type on sharepoint site but

    Can we restrict specific file type uploading on sharepoint library? only on library level.
    Thursday, March 12, 2009 1:37 PM

Answers

  • I think it can´t be done in a document library  , maybe you can define a new directive, coding, that activates everytime a new document is uploaded and delete the document if it´s from a specific file type.

    Kind regards.
    Alvaro Arias.
    Thursday, March 12, 2009 2:04 PM
  • You can block upload files types on your Site, have to open Central administrative page, and go to "Central Administration > Operations > Blocked File Types", there you select your Site and add The extension file you want to Block.

    If you want to block file on custom Document Library, you will need to create event handler and when you call "itemadding" cancel event
    e.cancel=True;

    Hope this help


    André Lage Microsoft SharePoint and CRM Consultant http://aaclage.blogspot.com
    Thursday, March 12, 2009 2:18 PM
  • You can write an event receiver that would handle this task.  It would require a developer skill set.  You could check the file type on the 'Adding' event and then discard. 
    Shannon Bray - MCT, MCPD, MCTS, MCITP
    Thursday, March 12, 2009 2:57 PM

All replies

  • I think it can´t be done in a document library  , maybe you can define a new directive, coding, that activates everytime a new document is uploaded and delete the document if it´s from a specific file type.

    Kind regards.
    Alvaro Arias.
    Thursday, March 12, 2009 2:04 PM
  • You can block upload files types on your Site, have to open Central administrative page, and go to "Central Administration > Operations > Blocked File Types", there you select your Site and add The extension file you want to Block.

    If you want to block file on custom Document Library, you will need to create event handler and when you call "itemadding" cancel event
    e.cancel=True;

    Hope this help


    André Lage Microsoft SharePoint and CRM Consultant http://aaclage.blogspot.com
    Thursday, March 12, 2009 2:18 PM
  • Hello,
     
    Alvaro is correct, there isn't an OOB configuration you can make on a list or library to restrict the uploading of specific content types.  I would look at programmatically limiting the upload function to specific file types.
    Chris Caravajal: SharePoint Help
    Thursday, March 12, 2009 2:19 PM
  • You can write an event receiver that would handle this task.  It would require a developer skill set.  You could check the file type on the 'Adding' event and then discard. 
    Shannon Bray - MCT, MCPD, MCTS, MCITP
    Thursday, March 12, 2009 2:57 PM
  • Sorry I when I talked about a directive I was thinking on a custom action thats will activated on  upload process like Shannon sais.
    Translation problems.....

    kind regards.
    Alvaro Arias.
    Friday, March 13, 2009 1:40 PM
  • You have to create a Event receiver to Restrict the file types. There is No out of the box solution to your requirement.

    Follow this article step by step Allow only Certain File Types to be Uploaded in SharePoint Document Library using Event Receiver

    ---------------------

    Regards,

    Sal

    Monday, September 3, 2012 9:15 AM
  • There is a great product exactly for that by KWizCom it is File Controller Feature. U can limit file size and file type for Document files in a library or as attachments to list items, you can configure it for document library/list, or by content type.

    We are using it and it is great product.

    • Proposed as answer by Nosm Elyashiv Wednesday, September 12, 2012 7:53 PM
    Wednesday, September 12, 2012 7:53 PM