Rick
Rick
CDCloudflare Developers
Created by Rick on 1/30/2025 in #workers-help
Unable to upload image to R2 via workers
Furthermore, when I print the r2Object, the output suggests that the upload was successful. But I cannot see the images in my bucket via the dashboard, nor can I access them using the custom domain. Anything that I directly upload to the bucket using the web dashboard can be seen and accessed via the custom domain.
R2 object: HeadResult {
ssecKeyMd5: undefined,
storageClass: '',
range: undefined,
customMetadata: {},
httpMetadata: {},
uploaded: 2025-01-30T09:19:51.241Z,
checksums: Checksums {
sha512: undefined,
sha384: undefined,
sha256: undefined,
sha1: undefined,
md5: ArrayBuffer {
[Uint8Contents]: <5a 57 6d f0 11 76 7a fd 18 fb 73 79 24 79 44 82>,
byteLength: 16
}
},
httpEtag: '"5a576df011767afd18fb737924794482"',
etag: '5a576df011767afd18fb737924794482',
size: 30335,
version: 'a2a8afad4456c043a6ba1a34a387cac2',
key: 'nohitb78plucoixwxvoqoxqqwbvc92ob__Screenshot 2025-01-24 161252.png'
}

R2 object: HeadResult {
ssecKeyMd5: undefined,
storageClass: '',
range: undefined,
customMetadata: {},
httpMetadata: {},
uploaded: 2025-01-30T09:19:51.241Z,
checksums: Checksums {
sha512: undefined,
sha384: undefined,
sha256: undefined,
sha1: undefined,
md5: ArrayBuffer {
[Uint8Contents]: <5a 57 6d f0 11 76 7a fd 18 fb 73 79 24 79 44 82>,
byteLength: 16
}
},
httpEtag: '"5a576df011767afd18fb737924794482"',
etag: '5a576df011767afd18fb737924794482',
size: 30335,
version: 'a2a8afad4456c043a6ba1a34a387cac2',
key: 'nohitb78plucoixwxvoqoxqqwbvc92ob__Screenshot 2025-01-24 161252.png'
}

3 replies
CDCloudflare Developers
Created by Rick on 1/24/2025 in #workers-help
unable to lazy load images
Thanks! it might be the issue with the element not having height or width. Let me check. Thanks for pointing me the right way!
4 replies
CDCloudflare Developers
Created by Rick on 1/24/2025 in #workers-help
unable to lazy load images
This works
<img src="/avatars/32606955_7942348.jpg" alt="logo"/>
<img src="https://digglu.gumlet.io/default_01.png" alt="Gumlet Logo">
<img src="/avatars/32606955_7942348.jpg" alt="logo"/>
<img src="https://digglu.gumlet.io/default_01.png" alt="Gumlet Logo">
This doesn't
<img src="/avatars/32606955_7942348.jpg" alt="logo" loading="lazy"/>
<img src="https://digglu.gumlet.io/default_01.png" alt="Gumlet Logo" loading="lazy">
<img src="/avatars/32606955_7942348.jpg" alt="logo" loading="lazy"/>
<img src="https://digglu.gumlet.io/default_01.png" alt="Gumlet Logo" loading="lazy">
4 replies