Skip to content

Commit 560b7db

Browse files
authored
Merge pull request #15599 from nextcloud/backport/15585/stable33
[stable33] docs(webdav): clarify chunked upload abort requirements
2 parents f880178 + b7cf093 commit 560b7db

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

‎developer_manual/client_apis/WebDAV/chunking.rst‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,24 @@ Uploading large files is always a bit problematic as your connection can be inte
1212
which will fail your entire upload. Nextcloud has a chunking API where you can
1313
upload smaller chunks which will be assembled on the server once they are all uploaded.
1414

15-
There are two versions of the chunking API. Version 1 is the original version and version 2 was built as a backward compatible extension to support uploads directly to supporting target storages like S3. Version 2 is the recommended version to use.
15+
There are two versions of the chunking API. Version 1 is the original version and version
16+
2 was built as a backward compatible extension to support uploads directly to supporting
17+
target storages like S3. Version 2 is the recommended version to use.
1618

17-
Version 2 comes with a few additional requirements and limitations to consider (compared to version 1):
19+
Version 2 comes with a few additional requirements and limitations to consider
20+
(compared to version 1):
1821

19-
- Every request needs to have a ``Destination`` header present which specifies the target path of the file
22+
- The ``MKCOL``, chunk ``PUT``, and final ``MOVE`` requests need to have a
23+
``Destination`` header present which specifies the target path of the file
2024
- The naming of the individual chunks is limited to be a number between 1 and 10000
2125
- The chunks will be assembled in the order of their names
2226
- The size of chunks must be between 5MB and 5GB (except for the last chunk, which can be smaller)
2327
- Chunks cannot be downloaded from the upload directory
2428

29+
The ``Destination`` header is not required when aborting an upload with
30+
``DELETE``. The destination and backend upload token are stored when the
31+
upload is created.
32+
2533
Nextcloud will expire the upload directory after 24 hours of inactivity. This means that if you start an upload and do not finish it within 24 hours, the upload directory will be deleted and the upload will fail.
2634

2735
Chunked upload v2
@@ -108,9 +116,16 @@ The chunks and the temporary upload folder will be deleted afterwards.
108116
Aborting the upload
109117
-------------------
110118

111-
If the upload has to be aborted this is a simple matter or deleting the upload folder.
119+
If the upload has to be aborted, delete the upload folder:
112120

113121
.. code-block:: console
114122
115123
curl -X DELETE -u roeland:pass \
116124
https://server/remote.php/dav/uploads/roeland/myapp-e1663913-4423-4efe-a9cd-26e7beeca3c0/
125+
126+
For a Chunking v2 upload, Nextcloud uses the stored upload metadata to cancel
127+
the backend chunked write before deleting the upload folder. This also aborts
128+
the underlying multipart upload when the target storage supports multipart
129+
uploads. No ``Destination`` header is needed for this request.
130+
131+
Uploads without Chunking v2 metadata are handled by normal DAV deletion.

0 commit comments

Comments
 (0)