any way to replicate list objects functionality through a public url?
any way to replicate list objects functionality through a public url?


rclone or r2 gave upr2 bucket with rclonerclone copy File.zip r2:/copyto as well but that didn't workforcePathStyle: true or else when using PUTObjectCommand, it yeilds: SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your secret access key and signing method. The documentation example should be updated to reflect it, if this is actually the case. I can confirm using the forcePathStyle set to Force fixes the issue for me.https://dev.name-of-my-app.com just fine.localhost to the prod bucket just fine. BUT, when I try to PUT from https://app.name-of-my-app.com, I get a 403 CORS error like this...https://app.name-of-my-app.com does not even though it's in the AllowedOrigins array. Appreciate any help y'all have.SignatureDoesNotMatch then it isn't a failure due to CORS, it would have failed anyways.PUT /pictures/ava/-cbcc-4f98-acaa-81c556b59712_227f8f9c-6da4-4430-8f6b-1c56c869e6e8.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=e45bd1f0b9630ed2055abb90de24%2F20231021%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20231021T025045Z&X-Amz-Expires=300&X-Amz-Signature=7a90fffd87b621c7f5a3fe2d03621beb5275fa8fc4aa3c75235892783aeaff9c&X-Amz-SignedHeaders=host&x-id=PutObject HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Authorization: Bearer jwtxx
Connection: keep-alive
Content-Length: 186746
Content-Type: image/jpeg
DNT: 1
Host: pictures.a88a0a0ec0a380338bfd981ac867c85a.r2.cloudflarestorage.com
Origin: http://localhost:5174
Referer: http://localhost:5174/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
sec-ch-ua: "Not=A?Brand";v="99", "Chromium";v="118"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"[
{
"AllowedOrigins": [
"http://localhost:5174"
],
"AllowedMethods": [
"PUT",
"POST",
"GET",
"DELETE",
"HEAD"
],
"AllowedHeaders": [
"x-requested-by",
"Content-Type"
],
"ExposeHeaders": []
}
]2023/10/21 17:52:57 ERROR : Attempt 1/3 failed with 1 errors and: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, HeadObjectInput.Key.
2023/10/21 17:52:57 ERROR : Attempt 2/3 failed with 1 errors and: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, HeadObjectInput.Key.
2023/10/21 17:52:57 ERROR : Attempt 3/3 failed with 1 errors and: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, HeadObjectInput.Key.
2023/10/21 17:52:57 Failed to copyto: InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, HeadObjectInput.Key.[r2]
type = s3
provider = Cloudflare
access_key_id = ***
secret_access_key = ***
region = auto
endpoint = https://***.r2.cloudflarestorage.com/bucket-nameSignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your secret access key and signing method.https://dev.name-of-my-app.com[
{
"AllowedOrigins": [
"http://localhost:3000",
"https://dev.name-of-my-app.com"
],
"AllowedMethods": [
"PUT",
"GET"
],
"AllowedHeaders": [
"*"
]
}
][
{
"AllowedOrigins": [
"http://localhost:3000",
"https://app.name-of-my-app.com"
],
"AllowedMethods": [
"PUT",
"GET"
],
"AllowedHeaders": [
"*"
]
}
]localhosthttps://app.name-of-my-app.comhttps://app.name-of-my-app.comAccess to XMLHttpRequest at 'https://...r2.cloudflarestorage.com/path/to/uploaded/file.txt?X-Amz-Algorithm=...' from origin 'https://app.name-of-my-app.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.AllowedOriginsSignatureDoesNotMatch