-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Unable to use fog-aws with DigitalOcean Spaces: MissingContentLength #428
Comments
@stanhu Your example will work if you pass :body as a string, rather than a File-object. As far as I can see, fog-aws will use streaming / chunked encoding ("x-amz-content-sha256: STREAMING-AWS4-HMAC-SHA256-PAYLOAD") when seeing a File-object, which DigitalOcean might not support? As a hack in your code, you could check if the endpoint/host matches "digitaloceanspaces.com", and make sure than you pass the backup file as a string, not as a File object? |
@quai Thank you! That was it. I see that there are others who encountered similar issues with other S3 providers:
Minio fixed the issue with this comment: minio/minio@b62cd8e |
I now see this comment in fog-aws that leaving out |
It looks like downgrading |
@stanhu glad you found a fix and thanks for sharing. |
v4 pre-signed URLs should be supported in all of our Spaces regions as of the last ~24 hours, too. If v4 doesn't work for some reason going forward please let me know on this thread, we'd be happy to take a look. Thanks for all the feedback. |
@jgannondo Indeed, it looks like it works now. Thanks! |
@jgannondo thanks for the update! |
@jgannondo It looks like uploads via the v4 API work fine, but downloads do not: When I downgraded to |
@stanhu Thanks for letting me know. I forwarded this to the new product manager who is covering Spaces and asked her to respond here. Just wanted to let you know. |
Is this problem resolved @jgannondo ? I think I'm still facing it with Gitlab job report downloads (that seem to use fog-aws for this...). I confirm that using the most recent version of Gitlab, and I had to set the signature version to 2 for this to work, so this is still an issue it seems... |
Ok, I just tested: fog-aws: 2.0.1 uploads ✅, downloads with temp URL: 💥 I believe https://github.com/fog/fog-aws/pull/463/files (#462) solved this issue. |
@stanhu great, thanks for updating us! |
Here is my test script:
When I do this, I see:
I've even tried hacking fog-core to insert the
Content-Length
header to no avail:/cc: @jgannondo
The text was updated successfully, but these errors were encountered: