upload_to_s3

Function upload_to_s3 

Source
pub fn upload_to_s3(
    upload_url: &str,
    file_bytes: Vec<u8>,
    client: &Client,
) -> Result<(), Box<dyn Error>>
Expand description

Uploads file bytes to the presigned S3 URL.

§Arguments

  • upload_url - The presigned S3 upload URL.
  • file_bytes - The raw contents of the file to upload.
  • client - A preconfigured reqwest::blocking::Client.

§Returns

Ok(()) on success.

§Errors

Returns an error if the upload fails or the server responds with a non-success status code.