
I keep getting " 'url' is valid but upstream response is invalid" when I try to fetch the preview using storage.getFilePreview
I am passing all the parameters correctly and the access at bucket level is set to CREATE for All Users and at file/image level it's set to READ, UPDATE, DELETE for the user that uploaded the file.
Yet I keep getting this error with a 404 status code

Can you share your code?

Are you passing in the jwt
with setJWT('eyJJ9.eyJ...886c4');
? Files that are not public (no guest) access can't be accessed without a jwt. Checkout this response by Steven https://discord.com/channels/564160730845151244/1157804153427460126/1158411341908934687
Link to Jwt docs: https://appwrite.io/docs/products/auth/jwt#proof-of-identity

I am using emailSession not jwt

Wait I'll just push the code to github and maybe that should provide more context

I think it doesn't matter you still need a jwt to access private files.

Ok


The code in feat/authentication branch is the one were I am implementing the auth atm

the call I make for getting file preview is in

lib > getUrl

this Url is used in components > TodoCard.tsx to display the image

store > AuthStore contains the methods like signup, login, googleLogin etc

it's weird, I do get the preview but I also get that 404

That's weird and I'm sorry I can't help. Just wait for a core team member or moderator to reply.

That's okay thanks for your time

Can you log the output of url?

See what the output is, cuz I don't think it should have anything.
According to the docs for getFilePreview, the response is just a 200 OK

Returns this

and using .toString on the url object returns the value of href as string

turns out everything is fine on appwrite side..... it's Next 13 that's causing it with it's mostly amazing but at time annoying Image component

I'll be deleting this branch so it will no longer be accessible anymore
Recommended threads
- Console create row ui not passing ID.uni...
I'm getting an error saying the id is already used but it should be created with ID.unique() it doesn't seem to be reading the row ID field at all. I can't get ...
- [FEATURE] Better usage analytics for app...
Recently, i've gotten **73** emails from appwrite regarding excesive GBHours usage. I've almost hit the limit of 1000 and it is really hard to track down which ...
- Images not showing up --
so i made this movie app - i hosted it successfully using appwrite but the images arent showing up --- https://movie-app-jsm.appwrite.network/ this is the movie...
