I've tested how the chunk upload of the .NET API is performed. The requests have to be as follows:
[POST] /DocuWare/Platform/FileCabinets/{{fcId}}/Documents
Headers:
Content-Type: {{FILETYPE}}
Content-Disposition: inline; filename={{FILENAME}}; modification-date="{{MODDATE}}"
X-File-Name: {{FILENAME}}
X-File-Size: {{FILESIZE}}
X-File-ModifiedDate: 07/22/2022 08:40:44
Cookie: {{COOKIES}}
Content-Length: {{CHUNKSIZE}}
Expect: 100-continue
Accept-Encoding: gzip
In the body add the chunk content
For each additional chunk use the following URI:
[POST] /DocuWare/Platform/FileCabinets/{{fcId}}/Documents?loc={{CHUNKSIZE * CHUNKNUMBER}}&chunkReference={{CHUNKREFERENCEGUID}}
- The loc parameter consists of the chosen chunk size (e.g. 300000 and the index of the chunk starting at 0). The first chunk has no loc, the second chunk has 300000 * 1 = 300000 the second has 300000 * 2 = 600000 and so on...
- The chunkReference parameter has to contain the guid from the response from the last response (Document -> FileChunk -> LastChunkId)
The header and the body are built the same way as in the first request. I attach a screenshot which show a chunk upload in Fiddler.
Please mind, that the upload might fail for large files because of time outs that might occur.
Best Regards,
Leopold