-
Notifications
You must be signed in to change notification settings - Fork 1.1k
In-memory transfer of binary data to S3 #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
No. You could use std::strstream (unless your data length is zero) -- you'll have to live with "this thing is deprecated" message though. Proper way is to write your own implementation of streambuf. I had to spend a day or so before I got minimal version right -- besides linear reading, this SDK moves stream ptr to the end to pre-calc data size. Be careful, most of internet "streambuf for beginners" guides have bugs in them. :-) Btw, I suggest not using std::stringstream for any type of files. |
I had the same problem trying to upload photo buffers: started with stringstream, later wrote my own StreamBuffer. With StreamBuffer, I'd get the correct content length but the signature of the content was off. I could write my buffer to a temp file then HTTP PUT it because FStream works fine. Solution: use boost bufferstream. Download but don't build boost. bufferstream and its dependencies are all in headers. #include <aws/core/Aws.h> #include <boost/interprocess/streams/bufferstream.hpp> [...]
configuration.region = region;
|
I wonder why PutObjectRequest requires Aws::IOStream and not just Aws::IStream... |
(I think) I figured out my leak issue: curllib on my amazon linux doesn't quite use nss properly for certificates, so it doesn't deallocate memory until app shutdown. We're going to go upgrade Amazon Linux 2 which has an newer version of nss; requires curllib 7.59 or greater, built on top of it--compile time dependency in curllib. Bug in nss (in curllib's use of nss) : Fix in curllib: Thanks. |
Can the Aws::StringStream be used to transfer binary data to S3? See the suggested code at the top of issue #64. I am getting a "BadRequest: An error occurred while parsing the HTTP request" error.
The text was updated successfully, but these errors were encountered: