How to save a bitmap object as an image on Amazon S3?
I have all the settings, but my limited C-sharp stops me from doing this.
Bitmap image = new Bitmap(width, height);
image.save(file_path);
S3 test = new S3();
test.WritingAnObject("images", "testing2.png", image);
PutObjectRequest titledRequest = new PutObjectRequest();
titledRequest.WithMetaData("title", "the title")
.WithContentBody("this object has a title")
.WithBucketName(bucketName)
.WithKey(keyName);
As you can see, the S3 function can only accept a string and save it as a file body.
How can I write this so that it allows me to pass in a raster object and save it as an image? Maybe like a stream? Or as an array of bytes?
I appreciate any help.
source
share