pub struct B2StartLargeFileUploadBody {
pub bucket_id: String,
pub file_name: String,
pub content_type: String,
pub custom_upload_timestamp: Option<u64>,
pub file_info: Option<HashMap<String, String>>,
pub file_retention: Option<B2BucketFileRetention>,
pub legal_hold: Option<B2FileLegalHold>,
pub server_side_encryption: Option<B2ServerSideEncryption>,
}Fields§
§bucket_id: StringThe ID of the bucket that the file will go in.
file_name: StringThe name of the file. See Files for requirements on file names.
content_type: StringThe MIME type of the content of the file, which will be returned in the Content-Type header when downloading the file.
Use the Content-Type b2/x-auto to automatically set the stored Content-Type post upload.
In the case where a file extension is absent or the lookup fails, the Content-Type is set to application/octet-stream.
The Content-Type mappings can be perused here.
custom_upload_timestamp: Option<u64>If this is present, B2 will use it as the value of the upload timestamp.
The value should be a base 10 number that represents a UTC time when the original source file was uploaded.
It is a base 10 number of milliseconds since midnight, January 1st, 1970 UTC. This fits in a 64-bit integer, such as the type long in Java,
and so it can be passed directly into the Java call Date.setTime(long time). The value must not use a date that is set to a time in the future.
If the value is null, it will be ignored.
Note: The timestamp should not interfere with the bucket lifecycle rules.
For example, a conflict between the timestamp and a lifecycle rule, such as daysFromStartingToCancelingUnfinishedLargeFiles,
may also result in a large file upload being canceled.
file_info: Option<HashMap<String, String>>A JSON object holding the name/value pairs for the custom file info.
file_retention: Option<B2BucketFileRetention>If present, specifies the Object Lock retention settings for the new file.
Setting the value requires the writeFileRetentions capability and that the destination bucket is Object Lock-enabled.
See Object Lock for details.
legal_hold: Option<B2FileLegalHold>If present, specifies the Object Lock legal hold status for the new file.
Setting the value requires the writeFileLegalHolds capability and that the destination bucket is Object Lock-enabled.
See Object Lock for details.
server_side_encryption: Option<B2ServerSideEncryption>If present, specifies the parameters for Backblaze B2 to use for encrypting the uploaded data before storing the file using Server-Side Encryption.
See Server-Side Encryption for details.
Implementations§
Source§impl B2StartLargeFileUploadBody
impl B2StartLargeFileUploadBody
Sourcepub fn builder() -> B2StartLargeFileUploadBodyBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> B2StartLargeFileUploadBodyBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building B2StartLargeFileUploadBody.
On the builder, call .bucket_id(...), .file_name(...), .content_type(...), .custom_upload_timestamp(...)(optional), .file_info(...)(optional), .file_retention(...)(optional), .legal_hold(...)(optional), .server_side_encryption(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of B2StartLargeFileUploadBody.
Trait Implementations§
Source§impl Clone for B2StartLargeFileUploadBody
impl Clone for B2StartLargeFileUploadBody
Source§fn clone(&self) -> B2StartLargeFileUploadBody
fn clone(&self) -> B2StartLargeFileUploadBody
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more