Sends part of file for the given upload identifier. If no upload identifier is given then it will create a new upload id. Use the offset to tell where the part of the total file starts.
1 min
PUT
/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}
Path Parameters
- uploadIdstring<uuid>requiredDescriptionFormatuuid
- offsetinteger<int32>requiredDescriptionDefault0Formatint32
Header Parameters
- acceptstringDescriptionDefaulttext/plainAllowedtext/plainapplication/jsontext/json
Responses
200
- UploadFile
- uploadIdstring<uuid>DescriptionFormatuuid
- offSetinteger<int64>DescriptionFormatint64
- expiresstring<date-time>DescriptionFormatdate-time
401
curl
curl --request PUT \
--url /episerverapi/commerce/import/upload/chunk/{uploadId}/{offset} \
--header 'accept: text/plain'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "text/plain");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Put.new(url)
request["accept"] = "text/plain"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}"
payload = {}
headers = {
'accept': 'text/plain',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// The file is uploaded.
{
"uploadId": "",
"offSet": "",
"expires": ""
}401
// If user does not have enough permission for this request.
PREVIOUS
Sends part of file for the given upload identifier. If no upload identifier is given then it will create a new upload id. Use the offset to tell where the part of the total file starts.
NEXT
Creates the file from the sum of the parts that were uploaded for the upload identifier. Returns the upload identifier if successful.