UploadAttachment
UploadAttachment uploads an email attachment. Must be
a POST request.
Available for premium accounts only.
Endpoint
Parameters
POST arguments
| Name | Description |
|---|---|
| uploadfile | Path to the file to be uploaded. |
| resulturl | URL to redirect to, once the upload is completed, with or without success. If this is not provided, the response is returned as XML |
| _charset_ | Optional parameter to denote the encoding for the filename |
Returns
The request can return the HTTP code 404 or 302.
404: Possible causes:
- UDB open failed
- Request was not a POST
302: Redirects to the
resulturl with the following additional parameters
| Parameter | Description |
|---|---|
| errorcode | see below |
| filename | Actual name of the file. |
| diskfilename | Name as stored on the disk, a generated random string. This is subsequently passed as part of SendMessage (also see ComposeMessagePart) for the file to be picked up when the actual message is sent.
|
| mimetype | MIME type of the attachment. |
| filesize | Size in bytes of the attachment. |
Error Codes (Upload related)
| Error code | Description |
|---|---|
| uploadAuthError | Request doesn't have proper credentials |
| uploadFileSizeError | File size is larger than currently supported |
| uploadNoFileError | File not specified |
| uploadPartialFileError | File was partially uploaded |
| uploadInternalError | Internal error with the upload script |
Error Codes (Virus related)
| Error code | Description |
|---|---|
| uploadAVInternalError | Failure during scan |
| uploadAVError | AV server had problems during scan |
| uploadAVNoVirus | No virus detected |
| uploadAVCannotClean | Virus could not be cleaned |
| uploadAVCleaned | Virus cleaned successfully |
| uploadAVNotScannable | File is not scannable |
| uploadAVServerDown | AV server is down |
| uploadAVHasVirus | File has virus |
Example
Example Output
Example XML Response
If a result URL is not provided, the response is returned as XML.

