Upload documents from file system to Sharepoint Document Library query

Last post 03-25-2008, 11:52 AM by sherif. 1 replies.
Sort Posts: Previous Next
  •  03-25-2008, 8:36 AM 22741

    Upload documents from file system to Sharepoint Document Library query

    Hi guys I need a little guidence with a process I am developing.

     The process involves uploading documents from a file system to a Sharepoint document library. The Documents are saved into to the file system folder automatically and these are then to be uploaded to a sharepoint library - this bit is straight forward.

    However a couple of questions

    a) how can I delete the document from the file system after a successful upload.

    b) how would I handle errors such as Invalid Characters in the filename (sharepoint doesn't support the same as widnows eg. &) or a file size larger than the max allowed.

    I've created the basic process in VS2005 using the Sharepoint Documents Event Wizard

    Also is it possible to recreate a folder tree if one exists and place the documents in the respective folder ?

    Thanks in advance

    David

    MOSS2007, K2 BlackPearl

     

     

  •  03-25-2008, 11:52 AM 22745 in reply to 22741

    Re: Upload documents from file system to Sharepoint Document Library query

    Hi David.

    for both (a) and (b) you'll have to drop to code.  you can do this in a server event added after (for [a]) and before (for [b]) the SharePoint Document event or in the code behind the SharePoint Document event itself.

    if this is something you'll be doing often, you can modify the Extender for the SharePoint Document event wizard to always give you this capability, or create your own Event Wizards to do this kind of cleanup for you.

    you will find some tutorials on the underground here to help with creating your own wizards here: http://k2underground.com/files/folders/technical_product_documents/entry21896.aspx

    hope that helps.


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
View as RSS news feed in XML