Upload a file to a folder
This endpoint enables you to upload a file to a folder on a Sage CRM server. You can upload only one file at a time.
Authentication
Session ID. For details, see Authentication: retrieve session ID for a user.
Headers
|
Key |
Value |
|---|---|
|
Content-Type |
multipart/form-data |
HTTP
POST http://{{server}}/sdata/{{install}}j/sagecrm/-/$service/fileUpload?SID={{sid}}
URI parameters
|
Name |
Description |
|---|---|
|
{{server}} |
The name or IP address of a Sage CRM server. |
|
{{install}} |
Sage CRM installation name. By default, this is CRM. |
|
{{sid}} |
The session ID of the user account under which to upload files. |
Request body
|
Key |
Value |
|---|---|
|
hiddenFileUpload |
Required. Data of the files to upload. |
|
hiddenUserFolder |
Optional. The name of a subfolder in <Sage CRM installation folder>\Library\ to upload the specified file to. Example value of hiddenUserFolder MyFolder When you omit this parameter, the file is uploaded to <Sage CRM installation folder>\Library\TEMP\<SID>, where <SID> is the session ID you use to authenticate your call. By default, Sage CRM is installed to %ProgramFiles(x86)%\Sage\CRM\CRM. |
Response
An XML object containing information about the uploaded file.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<message></message>
<file></file>
<status></status>
</root>
|
Name |
Description |
|---|---|
|
<file></file> |
Name of the uploaded file. |
|
<status></status> |
Upload status, such as SUCCESS or FAILURE. |
