Erisa | Support Engineer
05/21/2023, 8:11 PMhttps://cdn.discordapp.com/attachments/940663374377783388/1109936527611535490/IMG_2282.png▾
SuperVisor_16
05/21/2023, 8:11 PMSuperVisor_16
05/21/2023, 8:11 PMErisa | Support Engineer
05/21/2023, 8:11 PMaltryne
05/21/2023, 8:12 PMaltryne
05/21/2023, 8:12 PMZnuff
05/21/2023, 8:33 PMNoah Kennedy | Oxy
05/21/2023, 10:25 PMreqwest
library, and I keep getting served errors like Date provided in 'date' header (Sun, 21 May 2023 22:07:22 GMT) didn't parse successfully
. What date format does R2 expect? This matches the format seen on the S3 docs. Alternatively, is this just a misleading error, and another issue is causing me to see failures?kian
05/21/2023, 11:12 PMNoah Kennedy | Oxy
05/21/2023, 11:14 PMkian
05/21/2023, 11:16 PMkian
05/21/2023, 11:17 PMDate
header with Sun, 21 May 2023 23:16:00 GMT
seems to work for me right now - copy/pasting yours gives me a RequestTimeTooSkewed
error as expected.kian
05/21/2023, 11:17 PMreqwest
?Noah Kennedy | Oxy
05/21/2023, 11:18 PMrust
let upload_res = self
.http
.post(store_uri)
.bearer_auth(&self.config.store.key)
.header("x-amz-content-sha256", checksum)
.header(
"Date",
chrono::Utc::now()
.format("%a, %d %b %Y %H:%M:%S GMT")
.to_string(),
)
.body(upload)
.send()
.await;
Noah Kennedy | Oxy
05/21/2023, 11:18 PMNoah Kennedy | Oxy
05/21/2023, 11:18 PMkian
05/21/2023, 11:18 PMstore_uri
a presigned URL?Noah Kennedy | Oxy
05/21/2023, 11:19 PMhttps://<ID>.r2.cloudflarestorage.com/<name>
kian
05/21/2023, 11:20 PMx-amz-signature
and the like in the query params) then I'd expect this to fail as there's no signing - just not with that errorNoah Kennedy | Oxy
05/21/2023, 11:21 PMkian
05/21/2023, 11:23 PMkian
05/21/2023, 11:25 PMaws-sdk-rs
) will accept a request struct and generate it for you, otherwise there's the SDKs that'll manage the upload entirely or signers where you DIY it rather than passing it a request.Isaac McFadyen | YYZ01
05/21/2023, 11:27 PMIsaac McFadyen | YYZ01
05/21/2023, 11:27 PMIsaac McFadyen | YYZ01
05/21/2023, 11:27 PM