DeleteUploadHandler API
Deletes an upload handler and discards its staged temporary file on the server. Use this to clean up if a chunked upload is cancelled or if an error occurs before the upload is finalized with UploadDocumentWithHandler.
Endpoint
/srv.asmx/DeleteUploadHandler
Methods
- GET
/srv.asmx/DeleteUploadHandler?authenticationTicket=...&UploadHandler=... - POST
/srv.asmx/DeleteUploadHandler(form data) - SOAP Action:
http://tempuri.org/DeleteUploadHandler
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
authenticationTicket |
string | Yes | Authentication ticket obtained from AuthenticateUser. |
UploadHandler |
string (GUID) | Yes | The handler GUID returned by CreateUploadHandler. Must be a valid GUID string. |
Response
Success Response
<response success="true" error="" />
Error Response
<response success="false" error="Error message" />
Required Permissions
Any authenticated user may call this API.
Chunked Upload Workflow
Upload handlers stage large files on the server before they are committed to the document library. DeleteUploadHandler is the cleanup step:
CreateUploadHandler— Allocate a handler and obtain theUploadHandlerGUID andChunkSize.UploadFileChunk— Send the file in sequential chunks using the handler GUID.UploadDocumentWithHandler(orUploadDocumentWithHandler1/UploadNewDocumentWidthHandler) — Finalize the upload and create the document or new version.DeleteUploadHandler— Call this only if the upload is cancelled or fails before step 3 completes. After a successfulUploadDocumentWithHandlercall the handler is consumed automatically and does not need to be deleted manually.
Example
GET Request
GET /srv.asmx/DeleteUploadHandler
?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&UploadHandler=a1b2c3d4-e5f6-7890-abcd-ef1234567890
HTTP/1.1
POST Request
POST /srv.asmx/DeleteUploadHandler HTTP/1.1
Content-Type: application/x-www-form-urlencoded
authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&UploadHandler=a1b2c3d4-e5f6-7890-abcd-ef1234567890
SOAP Request
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://tempuri.org/">
<soap:Body>
<tns:DeleteUploadHandler>
<tns:authenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:authenticationTicket>
<tns:UploadHandler>a1b2c3d4-e5f6-7890-abcd-ef1234567890</tns:UploadHandler>
</tns:DeleteUploadHandler>
</soap:Body>
</soap:Envelope>
Notes
- If the handler's temporary file does not exist (e.g. already cleaned up or never fully written), the call still returns success — no error is raised.
- Passing a string that is not a valid GUID format returns an error immediately without performing any authentication check.
- Do not call
DeleteUploadHandlerafter a successfulUploadDocumentWithHandler— the handler is consumed by the finalization step and the temporary file is already removed. - Call
DeleteUploadHandlerif an error occurs at any point duringUploadFileChunkor beforeUploadDocumentWithHandleris called, to free the temporary server storage.
Related APIs
- CreateUploadHandler - Allocate an upload handler and obtain the GUID and chunk size
- UploadFileChunk - Upload a single chunk of a file to an open handler
- UploadDocumentWithHandler - Finalize the upload and create or update a document
- DeleteDownloadHandler - Delete a download handler and discard its temporary file
Error Codes
| Error | Description |
|---|---|
[900] Authentication failed |
Invalid or missing authentication ticket. |
[901] Session expired or Invalid ticket |
The ticket has expired or does not exist. |
bad Request |
UploadHandler is not a valid GUID string. |
For detailed documentation visit: https://support.inforouter.com/api-docs/DeleteUploadHandler