For Workes & Pages, what is the name of the domain?
wish-well.art
What is the error number?
no error - null object returned
What is the error message?
Object Not Found
What is the issue or error you’re encountering
Object Not Found with image uploaded via dashboard
What steps have you taken to resolve the issue?
I uploaded an image via the dashboard to an R2 bucket.
but the image cannot be found when using the API.
other objects added via API display fine, so I know it’s not a problem with the bucket.
are items added via the dashboard somehow not available via the API?
What are the steps to reproduce the issue?
image is available here:
// this is one we know exists
const defaultImage = '5e5d44fe900dfad37516c1e04eb5327ff61250354fc6b46ae1f2b6b00b4fd204.jpg';
// const defaultImage = 'eclipse-sq.jpg';
async function getObjectOrDefault(env: any, objId: string) {
let object = await env.WISHES_BUCKET.get(objId as string);
if (object === null) {
console.error('Object Not Found', objId);
object = await env.WISHES_BUCKET.get(defaultImage);
this is the code I use elsewhere to add images to bucket, these work fine
const imagePath = `${hash}.jpg`;
const bucket = context.env.WISHES_BUCKET;
await bucket.put(imagePath, img!.buffer);
attached screenshot from the bucket. I can’t see any other hash or ID of the object to use instead.