get_upload_authorization

Function get_upload_authorization 

Source
pub async fn get_upload_authorization<'a, 'b, C, E>(
    auth: &'a mut Authorization<C>,
    bucket: &'b Bucket,
) -> Result<UploadAuthorization<'a, C, E>, Error<E>>
where C: HttpClient<Error = Error<E>>, E: Debug + Display,
Expand description

Obtain an authorization to upload files to a bucket.

Use the returned UploadAuthorization when calling upload_file.

For faster uploading, you can obtain multiple authorizations and upload files concurrently.

The UploadAuthorization is valid for 24 hours or until an upload attempt is rejected. You can make multiple file uploads with a single authorization.

The Authorization must have Capability::WriteFiles.

ยงB2 API Difference

The equivalent B2 endpoint is called b2_get_upload_url.