Queue/SetFile
This method uploads a file or multiple files to a batch folder that is associated with the application name, queue ID, file name, and file extension. A page object is not added to the page file.
Files can be transferred as a binary string or by using Base64 encoding. When Base64 encoding is used, you must add Content-Transfer-Encoding: base64 to the header when you are streaming, or to the form part for multipart/form-data. For Base64 encoding, you can specify the Content-Type: as the file type. The SetFile request can accept a byte stream as the message body or can have the message body use the multipart/form-data format where the file byte stream is contained in each part.
If you specify a header field file name, then it is used as the file name for the uploaded the file. If you do not specify a header field file name, then the {fileName} in the SetFile URI is used as the file name for the uploaded file.
You can adjust the value of the maxAllowedContentLength and maxRequestLength settings in the web.config file. The maximum size message that can be uploaded depends on your web server, proxy server, and client.
URI
http://{IP address}:{Port}/ServicewTM.svc/Queue/SetFile/{application}/{queueId}/{fileName}/{fileExtension}
| Name | Type | Required? | Description |
|---|---|---|---|
| {application} | String | Yes | The name of the application for which the file is to be uploaded. |
| {fileName} | String | Yes | The name of the file that is to be uploaded. |
| {fileExtension} | String | Yes | The file name extension of the file that is to be returned, such as exe. Do not include the file name path, set.xml. |
Request content
The request content contains file that is to be uploaded.
Response content
The response for this method contains no content.
| Response Code | Description |
|---|---|
| 200 OK | The request was successful. |
| 400 Bad Request | The request was not understood by the service because of malformed syntax. |
| 401 Unauthorized | The request requires user authentication. If the request included valid credentials, the 401 response indicates that authorization was refused for those credentials. |
| 405 Method Not Allowed | The method that is specified in the Request-Line is not allowed for the resource that is identified by the Request-URI. The response must include an Allow header that contains a list of valid methods for the requested resource. |
| 411 Length Required | The service refuses to accept the request without a defined Content-Length. The client can repeat the request if it adds a valid Content-Length header field that contains the length of the message body in the request message. |
| 500 Internal Error | An unexpected condition was encountered that prevented the service from fulfilling the request. |