You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: developer_manual/client_apis/WebDAV/chunking.rst
+103-3
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,113 @@ Uploading large files is always a bit problematic as your connection can be inte
10
10
which will fail your entire upload. Nextcloud has a chunking API where you can
11
11
upload smaller chunks which will be assembled on the server once they are all uploaded.
12
12
13
-
Usage
14
-
-----
13
+
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.
14
+
15
+
Version 2 comes with a few additional requirements and limitations to consider (compared to version 1):
16
+
17
+
- Every request needs to have a ``Destination`` header present which specifies the target path of the file
18
+
- The naming of the individual chunks is limited to be a number between 1 and 10000
19
+
- The chunks will be assembled in the order of their names
20
+
- The size of chunks must be between 5MB and 5GB (except for the last chunk, which can be smaller)
21
+
- Chunks cannot be downloaded from the upload directory
22
+
23
+
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.
24
+
25
+
Chunked upload v2
26
+
-----------------
15
27
16
28
The API is only available for registered users of your instance. And uses the path:
17
29
``<server>/remote.php/dav/uploads/<userid>``. For this guide we will assume:
18
30
``https://server/remote.php/dav/uploads/roeland``
19
31
32
+
33
+
34
+
Starting a chunked upload
35
+
^^^^^^^^^^^^^^^^^^^^^^^^^
36
+
37
+
A chunked upload is handled in 1 folder. This is the location all the chunks
38
+
are uploaded to.
39
+
40
+
Start by creating a folder with a unique name. You can list the current available
41
+
folder but if you take a random UUID chances of collision are tiny.
0 commit comments