This `TusPlugin` installs a https://tus.io/[tus.io] compatible REST endpoint to upload temporary files, and a way for other APIs to reference these files via server-side data streams. This helps clients to upload large files over unreliable network connections, or parallelize uploads of multiple files for the same archive.
TIP: Tus will NOT improve upload speed or throughput over stable network connections. The fastest and most efficient way to upload large files to cdstar is via <<putFile>>. The best way to upload many small files to cdstar is via <<updateArchive>>. Only use tus if uploads need to be resumable or repeatable.
TIP: TUS will NOT improve upload speed or throughput over stable network connections. The fastest and most efficient way to upload large files to cdstar is via <<putFile>>. The best way to upload many small files to cdstar is via <<updateArchive>>. Only use TUS if uploads need to be resumable or you want to import the same file multiple times.
## Configuration
There is currently no configuration for this plugin. Uploads will be placed into `${path.var}/tus/` and deleted after 24h.
There is currently no configuration for this plugin. Uploads will be placed into `${path.var}/tus/`.
.Example Configuration
[source,yaml]
...
...
@@ -27,7 +26,9 @@ plugin.tus.class: TusPlugin
## Usage
The https://tus.io/[tus.io] compatible REST endpoint is reachable under `/tus` at the root-level of the service (next to `/v3`, not under it). After creating an upload target and uploading data following tus protocol, the temporary resource can be referenced as `tus:<tusId>`, where `<tusId>` is the last part of the tus resource URI. For example, if your tus upload target was `/tus/24e533e`, then the internal reference to this resource would be `tus:24e533e`.
The https://tus.io/[tus.io] compatible REST endpoint is reachable under `/tus` at the root-level of the service (not `/v3/tus` but just `/tus`). After creating a TUS handle and uploading data following TUS protocol, the temporary file can be referenced as `tus:<tusId>`, where `<tusId>` is the last part of the TUS handle. For example, if your TUS handle was `/tus/24e533e`, then the internal reference to this resource would be `tus:24e533e`.
Currently only the <<createArchive>> and <<updateArchive>> support server-side imports via the `fetch:<target>` functionality. For example, to import a completed TUS upload into an archive, you would send `fetch:/path/to/target.file=tus:24e533e` as a POST form parameter. Note that the digests must still be computed, so a fetch may take just as long as uploading the file directly. TUS usually does not improve overall throughput, but may improve reliability of large-file uploads over unreliable network connections. Use it wisely.
Currently only the <<createArchive>> and <<updateArchive>> support server-side imports via the `fetch:<target>` functionality. For example, to import an existing tus resource into an archive, you would send `fetch:/path/to/target.file=tus:24e533e` as a POST form parameter. Note that the digests must still be computed for server-side imports, so a fetch may take just as long as uploading the file directly. Tus usually does not improve overall throughput, but may improve reliability of large-file uploads over unreliable network connections. Use it wisely.
Incomplete TUS handles that do not see any new data will expire after 2 hours. Once complete, the TUS handle can be referenced for another 24 hours before it expires. Handles that are not needed anymore can (and should) be deleted faster with a single `DELETE` request to the TUS handle.