diff --git a/developer_manual/client_apis/WebDAV/bulkupload.rst b/developer_manual/client_apis/WebDAV/bulkupload.rst new file mode 100644 index 000000000..6bee64a92 --- /dev/null +++ b/developer_manual/client_apis/WebDAV/bulkupload.rst @@ -0,0 +1,43 @@ +=================== +File bulk upload +=================== + +.. sectionauthor:: Matthieu Gallien + +Introduction +------------ +Uploading many small files is often slower than what could be achieved because we do not +use the whole network bandwidth. Nextcloud has a bulk upload API where you can upload +many small files together in order to optimize the use of network bandwidth. + +Usage +----- + +The API is only available for registered users of your instance. And uses the path: +``/remote.php/dav/bulk``. + +Starting a bulk upload +^^^^^^^^^^^^^^^^^^^^^^^^^ + +A bulk upload is simply using a request structured as HTTP multipart with related mime type. + +Each file is then sent as one HTTP part. + +Each file inside an HTTP Part will need the following headers: + +* Content-Length: +* Content-Type: +* X-File-MD5: +* X-File-Mtime: +* X-File-Path: + +The reply is a json document with the following structure: + +.. code-block:: JSON + + { + "/small file.txt": { + "error": false, + "etag": "adb9aa24cbfa8e372c88431d1d99629a" + } + } diff --git a/developer_manual/client_apis/WebDAV/index.rst b/developer_manual/client_apis/WebDAV/index.rst index e389074d8..98268834a 100644 --- a/developer_manual/client_apis/WebDAV/index.rst +++ b/developer_manual/client_apis/WebDAV/index.rst @@ -12,4 +12,5 @@ Webdav trashbin versions chunking + bulkupload comments