1.3 KiB
1.3 KiB
outline of sharry uploading
-
POST to "new" route
- uri: https://sharry.yavook.de/api/v2/alias/upload/new
- hdr:
Sharry-Alias: $alias_id - res.status == 200
- res_json.success == true
- res_json.message == "Share created."
- $share_id := res_json.id
-
POST to "tus" route
- uri: https://sharry.yavook.de/api/v2/alias/upload/$share_id/files/tus
- hdr:
Sharry-Alias: $alias_id - hdr:
Sharry-File-Length: $file_bytes - hdr:
Sharry-File-Name: $file_name - hdr:
Sharry-File-Type: $file_mimetype - hdr:
Tus-Resumable: 1.0.0 - hdr:
Upload-Length: $file_bytes - res.status == 201
- $patch_uri := res_hdr.Location
-
(multi) PATCH to "$patch_uri"
- hdr:
Sharry-Alias,Sharry-File-Length,Sharry-File-Name,Sharry-File-Type,Tus-Resumable - hdr:
Upload-Offset: 10485760 * (n-1)for nth chunk - body: up to 10 MiB of binary data
- res.status == 204
- better use res_hdr.Upload-Offset
- hdr:
-
(opt) POST to "notify" route
- uri: https://sharry.yavook.de/api/v2/alias/mail/notify/$share_id
- hdr:
Sharry-Alias - res.status == 200
- res_json.success, res_json.message
hints
ideas
- max errors => stop