You can use SDriveTools API calls for uploading the S-Drive Attachments/Folders Files to Amazon. For this, you will need to use below methods:
...
Exceptions and Reasons for Upload Operations
[SDriveException]"Parent Folder IDs must be the same for all file records that are being uploaded".
[Reason] If Parent__c values which are passed in with the SObjects are not same for all S3Object.
[Solution] Give the parent folder ids the same for all S3Objects.
[SDriveException]"A file with the same name exists in the target folder (fileName) ".
[Reason] This exception occurs if a file with the same name exists in the same folder for S3Objects.The same file name condition holds when the file is not a WIP (WIP_c =false) file or the file is a WIP file (WIP_c =true) with the same file namebutithasbeenuploadedbyanotheruserlessthan12 hours ago.
[Solution]Upload files with different file names or delete the previously existing files before the upload.
[SDriveException]"Error occurred while checking the files to upload! File Name, File Size cannot be blank (fileName)".
[Reason]If the file name or file size fields that have been passed in with the SObject are null or empty.
[Solution]File name and file size is required for upload. Thus, pass non-blank values in with the SObject.
[SDriveException]"Name cannot start with a space or a dot and cannot contain any of the following characters: \\ /: ? \" < > | (fileName)".
[Reason]If the file name is invalid. Invalid name means, file name starts with a spaceor a dot and contains any of the following characters: \ / : ? \" < > |
[Solution]Do not upload a file with the name starting with space or a dot and contain any of the following characters: \ / : * ? \" < > | ~
[SDriveException]"You cannot upload a zero-length file (fileName)".
[Reason] If the file size is 0.
[Solution] Upload files that are greater in size than zero.
[SDriveException]"Files greater than (maxFileSize) cannot be uploaded. Please contact your system administrator for the file size limits! (fileName)".
[Reason]File being uploaded has a size greater than the maximum file size limit (MAX_FILE_SIZE configuration in S-Drive Configuration page).
[Solution]Do not upload files whose size greater than MAX_FILE_SIZE. Or Increase the MAX_FILE_SIZE configuration in S-Drive Configuration page.
[SDriveException]"Invalid parent id specified. Check your function parameters!".
[Reason] If object (parent) id, which is passed as a parameter, is not a Salesforce.com 15 or 18 characters long ID.
[Solution]Pass 15-character or 18-characterSalesforce.com ID as objectId parameter.
...
Error Messagesof ResultObject and Reasons
[errorMessage]"Wip Id is null! ".
[Reason] If wipId in the wipIds list parameter is null.
[Solution] Do not pass null Salesforce.com IDs of file objects.
[errorMessage]"'No such wip file with provided id: (wipId) ".
[Reason]If wipId in wipIds list is not available.
[Solution]Pass correct and available Salesforce.com ids of files objects.
[errorMessage]"There is no wip files".
[Reason]If all of wipId in wipIds list is null or wipIds' size is 0.
[Solution]Pass wipIds with length greater than0 and non-null string values.
[errorMessage]" Insufficient Privileges. You do not have not access to update operation".
[Reason]If Object-level security for update access is not allowed.
[Solution] Make sure that update access is allowed for your profile.
Html upload example:
...
Form Field | Value |
acl | 'private' |