Lens AI Profiler Cpp
|
Class for uploading images to AWS S3 in a separate thread. More...
#include <objectuploader.h>
Public Member Functions | |
ImageUploader (int uploadtype, const std::string &endpointUrl, const std::string &token, s3_client_config_t &s3_client_config) | |
Constructor to initialize the ImageUploader object. More... | |
bool | startUploadThread (const std::string &imagePath, const std::string &bucketName, const std::string &objectKey, const std::chrono::milliseconds &interval) |
Starts a thread that uploads the image to S3 in a loop at a specified interval. More... | |
void | stopUploadThread () |
Stops the running upload thread. | |
Class for uploading images to AWS S3 in a separate thread.
ImageUploader::ImageUploader | ( | int | uploadtype, |
const std::string & | endpointUrl, | ||
const std::string & | token, | ||
s3_client_config_t & | s3_client_config | ||
) |
Constructor to initialize the ImageUploader object.
credentials | AWS credentials for S3 access |
region | AWS region where the S3 bucket resides |
executor | Optional thread executor for upload tasks (defaults to PooledThreadExecutor) |
bool ImageUploader::startUploadThread | ( | const std::string & | imagePath, |
const std::string & | bucketName, | ||
const std::string & | objectKey, | ||
const std::chrono::milliseconds & | interval | ||
) |
Starts a thread that uploads the image to S3 in a loop at a specified interval.
imagePath | Path to the image file on local storage |
bucketName | Name of the S3 bucket where the image will be uploaded |
objectKey | Name of the object (filename) in the S3 bucket |
interval | Upload interval in milliseconds |