Also wouldn't the S3 api be faster on large scale? Since you won't be going through another layer of
Also wouldn't the S3 api be faster on large scale? Since you won't be going through another layer of servers.

.jpeg into blob


File is






.jpeghttps://kuskus.e1a1737083ffd849ad2638b7e6069dec.r2.cloudflarestorage.com/github-profile?X-Amz-Expires=3600&X-Amz-Date=20240501T150941Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=4b9db796d0eecc94ddc55e4681d21b0b%2F20240501%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=accept-encoding%3Bhost&X-Amz-Signature=379f324c8c9d25897286c136b774782298cf9c1981fcd62a76fec807eee3b43a try {
const response = await fetch(
"https://avatars.githubusercontent.com/u/6391776?v=4s",
)
if (!response.ok) throw new Error("Network response was not ok")
const blob = await response.blob()
const arrayBuffer = await blob.arrayBuffer()
await client.put("github-profile", arrayBuffer)
} catch (error) {
console.error("Error fetching the image:", error)
}