Toggle menu

fileToSharepoint

Description

Takes a string encoded file and uploads it to SharePoint.

Parameters

NameTypeDescription
fileNameString, requiredThe UUID of the file to upload
sharepointFolderString, requiredThe folder/folder path in SharePoint to upload to
authDetailsObject, optionalThe authDetails set in the worker configuration to use. If not set the request will use the default authDetails
authDetails.identifierStringThe identifier of authDetails set in the worker configuration
authDetails.authTypeStringThe authType of authDetails set in the worker configuration
overwriteBoolean, optionalDefault: true
Whether or not you want to overwrite a file that already exists. If this property is set as false and the file already exists in SharePoint, an error will be thrown
encodingString, optionalDefault is "base64"
The character encoding to use to decode the provided data into a Buffer. See NodeJS documentation for supported character encoding: https://nodejs.org/api/buffer.html#buffers-and-character-encodings

Example

{
    "id": "123",
    "jsonrpc": "2.0",
    "method": "fileToSharepoint",
    "params": {
        "fileName": "File1.txt",
        "sharepointFolder": "Shared Documents",
        "overwrite": "true",
        "data": "RmlsZSBPbmUgQ29udGVudA==",
        "encoding": "base64"
    }
}

Last modified on 30 October 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon