Expand description
§jotta-fs
Jotta FS is a thin wrapper around the Jottacloud REST API.
§Jottacloud API Discoveries
§Uploading
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.
§Chunked uploads
Uploads can be easily chunked by POSTing 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.
- There doesn’t seem to be any minimum for the chunk size. Tested with 1 byte per request.
There is no need to allocate between every chunk ((might be false)upload_urlcan be reused).resume_posis available at the file metadata endpoint too.
Re-exports§
pub use errors::Error;
Modules§
- api
- API client utilities.
- auth
- Authentication and authorization for Jottacloud itself and whitelabel providers.
- errors
- Nobody is perfect.
- files
- Utilities for the API at
api.jottacloud.com/files/v1. - jfs
- XML and Serde don’t work well together. Pain.
- path
- Jottacloud paths.
- range
- Ranges of bytes.
Structs§
- Fs
- A Jottacloud “filesystem”.
Statics§
- USER_
AGENT User-Agentused in all requests to Jottacloud.