Files are saved as folders containing xl.meta files for minio docker container #17574
-
Describe the bugWhen uploading a file (image png/jpg or json file) using a string stream, let's say I tried to save the image locally and it was working totally okay so the encoder code is working. Also, I remember one year ago it was saving on minio container fine but now I came back to the same exact code one year ago but still the issue arises. Also it was discussed in github on AWS C++ sdk repo here Conditions:
Where it was tried:
How it can be seen
Expected BehaviorGet an image/json file not a folder Current BehaviorI get a folder called Reproduction Stepsdocker image command line: docker run -p 9000:9000 --name minio -e "MINIO_ACCESS_KEY=minioadmin" -e "MINIO_SECRET_KEY=miniokey" -v C:/aws/data:/data minio/minio server /data // connect to a bucket using the examples then using this method:
bool saveData(const char *rawData,
size_t dataSize,
const std::string &filename) {
Aws::S3::Model::PutObjectRequest putObjectRequest;
putObjectRequest.WithBucket(bucketName_.c_str()).WithKey(filename.c_str());
auto data = Aws::MakeShared<Aws::StringStream>(
"PutObjectInputStream",
std::stringstream::in | std::stringstream::out
| std::stringstream::binary);
data->write(rawData, dataSize);
putObjectRequest.SetBody(data);
// these lines were tried too and they didn't fix it
// putObjectRequest.SetContentType("image/jpeg");
// putObjectRequest.SetContentLength(dataSize);
auto result = client_->PutObject(putObjectRequest);
if (result.IsSuccess()) {
return true;
}
return false;
} Full code repo link (to reproduce the issue with commands for docker file in readme)AWS CPP SDK version used1.11.65 (vcpkg) Compiler and Version usedVisual Studio 2017 15.9.48 Community Operating System and versionWindows 10 19044.3086 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
This is expected behavior. You cannot and should not access files outside the S3 API. |
Beta Was this translation helpful? Give feedback.
-
While I understand the fact that the underlying storage of objects is not designed for direct access I see a valid use case for it. I can imagine a simple, lightweight Fuse based solution for at least read only mounts, even with the tradeoff of having no event triggers nor permission management. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
This is expected behavior. You cannot and should not access files outside the S3 API.