POST api.ashx/v2/cfs/temporary.{json|xml}
Request Parameters
| Name | Type | Location | Description | Required | Default | Options |
|---|---|---|---|---|---|---|
| ApplicationId | Guid | Request Body | The ID of the application into which this file will be stored. | Optional | ||
| ApplicationTypeId | Guid | Request Body | The ID of the application type into which this file will be stored. | Optional | ||
| ContentTypeId | Guid | Request Body | The ID of the content type into which this file will be stored. | Optional | ||
| CurrentChunk | int | Request Body | The current chunk of a set of chunks making up a file. It should be the sequential value of the chunk currently being sent. Required when sending a file in seperate chunks. | Optional | ||
| FileName | string | Request Body | The name of the file being uploaded. If the file is being sent in chunks it should be the same for each chunk. Required when uploading a file, but not when testing. | Optional | ||
| Test | string | Request Body | When specified, this request is treated as a test to determine upload speed and no temporary file is saved. | Optional | ||
| TotalChunks | int | Request Body | The total amount of chunks being sent for the file. It should be the same value on each chunk request. Required when sending a file in seperate chunks. | Optional | ||
| TotalSize | Int64 | Request Body | The total size of the file (total of all chunks). | Optional | ||
| Type | string | Request Body | The type of file being uploaded (used for validation). | Optional | Image | |
| UploadContextId | Guid | Request Body | A Guid identifier that represents the temporary file context for working with one or more temporary files. | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.post({
url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/cfs/temporary.json',
data: {
'UploadContextId': '49fec544-6df7-4a82-872b-f8be586d5e9e'
}
}).then(function(response) {
// use response
});Example Responses
JSON
{
"UploadedFile": {
"UploadContextId": "49fec544-6df7-4a82-872b-f8be586d5e9e",
"DownloadUrl": "downloadurl",
"TotalChunks": 6,
"CurrentChunk": 25,
"FileName": "filename"
},
"Errors": [
"string",
"string"
]
}XML
<?xml version="1.0" encoding="utf-16"?>
<Response>
<UploadedFile>
<UploadContextId>49fec544-6df7-4a82-872b-f8be586d5e9e</UploadContextId>
<DownloadUrl>downloadurl</DownloadUrl>
<TotalChunks>6</TotalChunks>
<CurrentChunk>25</CurrentChunk>
<FileName>filename</FileName>
</UploadedFile>
<Errors>
<Message>string</Message>
<Message>string</Message>
</Errors>
</Response>