ODBC Driver for Microsoft SharePoint

Build 25.0.9434

UploadDocument

Uploads a document to a SharePoint document library. Essential for adding new files for collaboration and document management.

Stored Procedure Specific Information

Uploading Large Files with Chunk Upload

To upload large files, you can activate the chunk upload logic by setting the ChunkSize input to a positive value lower than 250, which is the maximum upload size limit for Microsoft SharePoint.

  • Suggested Chunk Size: SharePoint recommends a chunk size of 10MB.
  • Usage Limits: Uploading large files with small chunks may exceed usage limits, causing Microsoft SharePoint to throttle further requests from that client temporarily. For requests made directly in the browser, Microsoft SharePoint will redirect you to a throttling information page, and the requests will fail.
Availability: The chunk upload feature is available only for SharePoint 2016/2019 Server and SharePoint Online editions.

Input

Name Type Required Description
File String False The local file path of the document to be uploaded. Example: 'C:/Users/User/Documents/myfile.txt'.
FileContent String False The Base64-encoded content of the file to be uploaded. If specified, the value of 'File' input will be ignored.
Library String True The name or relative URL of the SharePoint document library where the file should be uploaded.

Example formats:
Root directory:Documents
Sub-folder:Documents/Subfolder

If the URL connection property is set to a site collection, this relative URL corresponds to a path within the base site. If URL points to a specific site, the relative URL will be relative to that site.
Name String False The filename assigned to the uploaded document. If uploading to the root directory, provide only the filename. If uploading to a subdirectory, prepend the full folder path.

Example formats:
Root Directory:filename.txt
Sub-directory:MyFolder/filename.txt
ChunkSize Int False Specifies the size in megabytes (MB) of chunks used for multi-part uploads. Useful for large files.

Result Set Columns

Name Type Description
Success Boolean Indicates whether the file upload operation was successful.
Id String The unique identifier assigned to the uploaded document in SharePoint.
DocumentId String The document ID assigned to the file within SharePoint.
DocumentIdUrl String The direct URL associated with the document ID in SharePoint.
FileRef String The file reference path in SharePoint after the document is uploaded.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434