Upload a File


Updated: October 9, 2012

Applies To: Windows Server 2012 Essentials

Uploads a file to a location where the user has access permissions.

POST services/builtin/FileContentAccessService.svc/filecontent?overwrite={overwrite}&path={path}

true to overwrite any existing file; otherwise, false.

A network path that begins with the server name, in the format /ServerName/FolderPath/FileName.

POST https://www.contoso.com/services/builtin/FileContentAccessService.svc/filecontent?overwrite=false&path=servername/Company/2.txt HTTP/1.1  
Accept: application/xml  
Cookie: ASP.NET_SessionId=********************  
Canary: *********************  
Host: domainname  
Content-Length: ***  
<file content>  

HTTP/1.1 201 Created  

Error CodeError Message
400The path is too long or has unsupported characters (such as *\&#124;"<>).
401Access is denied to the requested resource.
409An item already exists with the requested new name.

The file content should be put into the stream of the HTTP request. Uploads that can be resumed are not supported.

By default, the maximum size of a file that can be uploaded is 100 MB.

Web Service Methods

Community Additions