Skip to content

upload_file resulting in 'The specified Content-MD5 did not match what we received' error #126

@tblais1224

Description

@tblais1224

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 setting send_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:

  1. call upload_file with a path_to_file and parent

Expected 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):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions