Closed Kapsztajn closed 1 week ago
@Kapsztajn thanks for asking and would be great if it did. No reason it should not but haven't tried yet personally.
@rufuspollock I managed to make it work, but it required some changes. Firstly, CloudFlare does not allow any access to the API for public buckets you always need to provide keys or have a presigned URL. I have added the function generatePresignedURL, changed the function createS3QueryUrl, modified index.html to provide read-only API keys, removed region as CloudFlare does not support that, and removed some CloudFlare unused values. Im not very good at JS, so all the changes could be terrible implemented.
How do I proceed with that now? My changes break S3 functionality to make R2 work. Should I create a fork and mention you and the s3-bucket-listing tool there, or should I try to implement some if statements and prepare a PR?
@Kapsztajn great work.
Best would be to fork this repo, create a branch "r2", switch to that branch. Push your changes for now with some details about the differences in, say, README.R2.md. I think that is better than if
statements for now.
I had emails about the solution I created, so I finally forked it. https://github.com/Kapsztajn/r2-bucket-listing It is pretty basic but solid web developer can tweek it with some CSS and proper JS. I will close this issue as it is not an issue any more ;)
Does anyone make it work with CloudFlare R2 storage? I tried to do that but getting 400 Bad Request with different configurations.![image](https://github.com/rufuspollock/s3-bucket-listing/assets/23492161/33c2b55d-380d-483a-8aee-6ca65a9a9e75)