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
+
- Every request needs to have a `Destination`` header present which specifies the target path of the file
17
+
- The naming of the individual chunks is limited to be a number between 1 and 10000
18
+
- The chunks will be assembled in the order of their names
19
+
- The size of chunks must be between 5MB and 5GB (except for the last chunk, which can be smaller)
20
+
- Chunks cannot be downloaded from the upload directory
21
+
22
+
Chunked upload v2
23
+
-----------------
24
+
25
+
The API is only available for registered users of your instance. And uses the path:
26
+
``<server>/remote.php/dav/uploads/<userid>``. For this guide we will assume:
27
+
``https://server/remote.php/dav/uploads/roeland``
28
+
29
+
30
+
31
+
Starting a chunked upload
32
+
^^^^^^^^^^^^^^^^^^^^^^^^^
33
+
34
+
A chunked upload is handled in 1 folder. This is the location all the chunks
35
+
are uploaded to.
36
+
37
+
Start by creating a folder with a unique name. You can list the current available
38
+
folder but if you take a random UUID chances of collision are tiny.
0 commit comments