UploadFile
Description
The UploadFile() method allows users to pre-upload images, documents or templates to be used when sending letters and postcards through the PostalMethods service.
When sending multiple letters and postcards containing similar content, you may upload them first to the PostalMethods servers and reference them when executing a "Send" request. Please view the various "Send" methods for more details.
Availability
Number of pre-uploaded files is limited per account. See limitation details.
Formal Definition
https://api.postalmethods.com/2009-02-26/PostalWS.asmx?op=UploadFile
Input
| Property | Type | Comments |
|---|---|---|
| Username | String | As provided during registration |
| Password | String | As provided during registration |
| MyFileName | String | Up to 255 characters. Format: <filename>.<extension>Give a name to the uploading file. Use this name when referring to this file in one of the Send methods. File name is unique for all users of the account. |
| FileBinaryData | base64Binary | Document represented as base64 encoded binary data |
| Permissions | Account or User | Determines which users can access this file. See File Permissions |
| Description | string | Free text field. Add your description to help you identify it |
| Overwrite | boolean | Indicates whether to overwrite an existing file with the same file name |
Output: UploadFileResponse
| Element | Type | Comments |
|---|---|---|
| UploadFileResult | int | In case of successful submission, the value -3000 is returned. In case of failure, a value different than -3000 is returned indicating the failure reason. See the list of Web Service Result Codes. |
File Permissions:
| Action | User | Account |
|---|---|---|
| Upload files | User permissions | Account or User permissions |
| Delete files | Only my files | All files |
| View file details | My files and Account files | All files |
| Use files for sending | My files and Account files | All files |
Account Administrators can set the user's permissions level in the PostalMethods Control Panel > Account > Users.
Change Log
- Added a "Description" field
