Introduce multipart argument

parent a35310c8
...@@ -49,6 +49,7 @@ struct VPFX(tus_server) { ...@@ -49,6 +49,7 @@ struct VPFX(tus_server) {
char *basedir; char *basedir;
char *schemeauth; char *schemeauth;
VCL_BYTES max; VCL_BYTES max;
VCL_BYTES multipart;
VCL_DURATION expires; VCL_DURATION expires;
int basefd; int basefd;
struct tus_files files[1]; struct tus_files files[1];
......
...@@ -263,6 +263,7 @@ tus_server__init(VRT_CTX, struct VPFX(tus_server) **tussrvp, ...@@ -263,6 +263,7 @@ tus_server__init(VRT_CTX, struct VPFX(tus_server) **tussrvp,
return; return;
tussrv->max = args->max; tussrv->max = args->max;
tussrv->multipart = args->multipart;
tussrv->expires = args->expires; tussrv->expires = args->expires;
tussrv->digest = d; tussrv->digest = d;
......
...@@ -113,7 +113,8 @@ $Object server( ...@@ -113,7 +113,8 @@ $Object server(
BYTES max=1073741824, BYTES max=1073741824,
DURATION expires=86400, DURATION expires=86400,
[STRING basedir], [STRING basedir],
[STRING name_hash]) [STRING name_hash],
BYTES multipart=5242880)
Declare a tus server at the given ``schemeauth``, which is the Declare a tus server at the given ``schemeauth``, which is the
protocol and servername, like ``https://tus.io``. protocol and servername, like ``https://tus.io``.
...@@ -153,6 +154,10 @@ as the last part of the url when constructing the backend ``PUT``. For ...@@ -153,6 +154,10 @@ as the last part of the url when constructing the backend ``PUT``. For
``Upload-Concat: final`` uploads, this name is also used as the ``Upload-Concat: final`` uploads, this name is also used as the
``Location`` returned to the client. ``Location`` returned to the client.
The ``multipart`` argument specifies the size of multipart uploads:
For each chunk of this size, a separate backend request will be
issued.
$Method BOOL .recv([STRING url], [STRING id]) $Method BOOL .recv([STRING url], [STRING id])
Process a tus request. Process a tus request.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment