-
Notifications
You must be signed in to change notification settings - Fork 103
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
upload_file resulting in 'The specified Content-MD5 did not match what we received' error #126
Comments
Hey @tblais1224 thanks for the report. According to the code, we should be setting it for all file uploads (chunked or not). Do you happen to have a specific example you could share or is this happening to all of your files? Maybe you could |
Right, that would be the same thing. One is just passed around more to the lower-level methods whereas the chunked version visibly appends it to the query string params. Thanks for the report. I don't have bandwidth to investigate this right now, but I encourage you to share your findings if you're able to take a deeper look. I'd be surprised if the SHA1 values changed between Ruby versions, so I wonder what else could be involved. Maybe you could run a few test requests and compare the SHA values to ones you calculate yourself directly using ruby irb |
Following up here, haven't found the cause of the issue but I'm beginning to suspect Box just isn't calculating file sizes correctly. I have been sending files with the arg |
Describe the bug
I recently started hitting the error 'The specified Content-MD5 did not match what we received' when using
upload_file
to send files into box from an AWS file path. The error's began to occur not long after upgrading to ruby 3.2.2, so I'm not sure if that could be related. Box's documentation recommends sending an SHA1 (https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/#400-bad-request) with the request to resolve this issue but i noticed this only being done in Boxr when using chunk uploads. Any ideas to resolve this one? My next step is going to be settingsend_content_md5
to false, but I'm worried this may result in issues down the road with broken file uploads.To Reproduce
Steps to reproduce the behavior:
upload_file
with a path_to_file and parentExpected behavior
The file uploads into the box parent folder
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: