Skip to main content
pub struct UploadOptions 
    pub recursive: bool,
    pub ttl: i32,

Options for file upload operations.

Example

Fields

recursive: bool

Whether to search subdirectories for the files to upload. Default: true

This applies to glob patterns and to a directory given by name, which uploads its files as <directory>/* does. A file given by name is uploaded alone either way: upload(“/data/file.csv”) uploads that file, not also /data/sub/file.csv. Files found below a pattern’s or directory’s base go to the same path below the remote directory.

ttl: i32

Time-to-live value for uploaded files in seconds. A value of -1 or 0 means no expiration. Default: -1

Implementations

Source

pub fn new() -> Self

Creates a new UploadOptions with default values.

Source

pub fn with_recursive(self, recursive: bool) -> Self

Sets whether patterns and directories given by name are searched below their own level. See UploadOptions::recursive.

Source

pub fn with_ttl(self, ttl: i32) -> Self

Sets the TTL (time-to-live) in seconds for uploaded files. Use -1 or 0 for no expiration.

Source

pub fn is_recursive(&self) -> bool

Returns whether recursive search is enabled.

Source

pub fn ttl(&self) -> i32

Returns the TTL value.

Trait Implementations

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source

fn fmt(&self, f: &mut Formatter<’_>) -> Result

Formats the value using the given formatter. Read more
Source

fn default() -> Self

Returns the “default value” for a type. Read more