Crates.io | jotta-fs |
lib.rs | jotta-fs |
version | 0.1.3 |
source | src |
created_at | 2022-03-12 22:52:40.123653 |
updated_at | 2022-03-20 20:30:04.40966 |
description | Third-party low-level Jottacloud client for Rust. |
homepage | |
repository | https://github.com/akeamc/jotta |
max_upload_size | |
id | 548940 |
size | 48,264 |
jotta-fs
Jotta FS is a thin wrapper around the Jottacloud REST API.
You need to allocate before uploading:
POST https://api.jottacloud.com/files/v1/allocate
The JSON body must contain an md5
field, which makes streaming complicated.
A successful allocation will return an upload_url
that you can POST
the data to.
Uploads can be easily chunked by POST
ing to the previously obtained upload_url
with the desired chunk
and a Range
header specifying where in the complete file this chunk is located.
Jottacloud will return an HTTP 420
error (whatever that is) and an IncompleteUploadOpenApiException
,
but it does work. Trust me. The next allocation call will have a new resume_pos
field.
upload_url
can be reused).resume_pos
is available at the file metadata endpoint too.