Re: programmatically upload to document library

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Chris

If you want to perform the upload from another machine than the server you have to use the Web Services or RPC
The following blog entry gives you all the code needed:
http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html

Regarding the limited access then having either seperate document libraries or folders with the right permissions is the
easiest way.
Otherwise you have to set item level permission on each document either in you upload program or an event handler

On Mon, 2 Jun 2008 10:40:48 -0700 (PDT), Chris Pax <christopher.pax@xxxxxxxxx> wrote:


I Have a question simular to this one:
http://groups.google.com/group/microsoft.public.sharepoint.portalserver.development/browse_thread/thread/70368c298431f902/bf259edab2ee962d?lnk=gst&q=document+library

only that none of the example work there for me.

I want to make a function that programmatically uploads
documents, .doc
files, to a document library.

something like this:
upload_document("document.library.name/filepath",
"file/location/of/document.doc");

can this be done through the SP services, or SP API?
is there a good example for this action?

second question:
I would also like to attach a type to these files. some are finance,
or
spending. if i tag the file with finance, i want everybody who is in
the
'finance' group i made on SP to be able to see it.

how can this be done?
I think i could make seprate document collections and upload the
diffrent
documents to them, and just set permission to the document
collection.
but, is there a easyer way.


note, plese give complete code to, like how to connect. i am able to
connect with share point using webservices, but im haveing trouble
connecting using the API. Im a newbie at this is all im saying.
--
BR

Per Jakobsen
Blog: http://www.theblackknightsings.com
.



Relevant Pages

  • Re: FrontPage Extensions trouble
    ... I'm VERY new to web services. ... Extensions basically enable the web server to be talked to directly from ... possible to upload files via FTP to an FP-enabled web site. ... able to put classic ASP files in the same directory and use FTP and IE ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How do I upload a document using Sharepoint web services
    ... Just use a regular HTTP put command. ... > Sharepoint's web services. ... > in a doc lib (note, no add example for documents exists in the SDK). ... > I assume I need an altered version of this to actually upload a document ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Can you Upload a file to a Document Library via the Web Services ?
    ... you can use the SPS web services to upload documents ... Dim WebReq As HttpWebRequest ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: Large File Upload using Webservices...
    ... I am using a native asp.net file upload technic which currently supports small files. ... I have used many 3rd party components, but since my Web Server, App Server and file server are located in seperate machines, 3rd party components, what i have used does not fit in to this architecture. ... I am using web services in app server to communicate between web and app servers. ... Please suggest me any .net technics or 3rd party components supporting large file uploads with this architecture. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Can we create folder and make SHAREPOINT SERVER automatically upload it
    ... > BALAji, ... > upload files into a document library. ... ise the SharePoint Object Model or Web Services ... >> sharepoint server to automatically upload it ...
    (microsoft.public.sharepoint.portalserver)