-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
400 Bad Request when using with R2 #53
Comments
Let me reproduce this locally with r2. I'll get back to you in 24hrs or so. |
I was able to reproduce it. I'll figure out the fix and publish it over the weekend. |
Okay so my preliminary findings: R2 does not support signed post policies (they don't mention this in the docs). I chose to use signed post policies instead of the simpler signed put urls because post policies support the conditions which provide validation of things like file size and content-types. In order to fully support R2 I will need to implement generating signed put urls, which is totally feasible, however there may be a loss of some functionality in certain advanced edge-cases. The happy path of uploading should still work fine. What remains is I have to figure out how to handle the Gonna work on this over the weekend, it seems like a straight-forward implementation. |
Thank you so much for the quick turn-around! |
Update: I have R2 support working, you can see the PR here, #58 Interesting thing I found when implementing this is that R2 needs to have a CORS config applied onto the bucket, which S3 does not. All I have left to do is:
Will get to it in the next day or so, apologies for the delay. If you need support urgently just build a package off of my PR and it should work as long as you provide |
This is awesome! |
I also tested with BackBlaze B2, seems to have similar issue with Cloudflare R2 |
Hey Tim,
I'm getting an error when trying to use the lib with R2 for some reason. I have tested my config & endpoint using Bruno ( Postman alternative) and that works properly, but I'm getting bad request with
next-upload
.Have you ever tested it with R2?
Error:
This is my config:
Thank you,
-8x4
The text was updated successfully, but these errors were encountered: