Skip to content
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

MD5_CHECKSUM error while uploading a file #194

Open
sankalpanand opened this issue Sep 7, 2023 · 0 comments
Open

MD5_CHECKSUM error while uploading a file #194

sankalpanand opened this issue Sep 7, 2023 · 0 comments

Comments

@sankalpanand
Copy link

sankalpanand commented Sep 7, 2023

I'm uploading the file like this-

String path = getClass().getClassLoader().getResource("SmallImage.png").getPath();
String name = "SmallImage.png";
StoredObject object = container.getObject(name);
UploadInstructions uploadInstructions = new UploadInstructions(new File(path));
object.uploadObject(uploadInstructions);

The library itself generates the Etag and adds it to the PUT request header. But then I get the MD5_CHECKSUM error when I try to upload. I don't understand why that MD5 checksum is rejected the the server when the library itself is generating the etag.

The workaround of not supplying the etag does not work either since the library mandatorily adds the etag header here in UploadObjectCommandImpl.prepareUpload method.

Please suggest what can be done here to solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant