Back

Display image by url in img tag of angular web app results in 404 even though it exists

  • 0
  • Self Hosted
  • Web
  • Storage
BomL97
20 Sep, 2024, 06:49

Hello all, I have a bucket full of images I'd like to display in my web application. Currently, I am using the getFileForView() function of the Storage SDK to get the url of images in the bucket. I then want to use the url to display the images inside a img tag using src. Yet, the images are not displayed. In the network tab a 404 error is thrown for the requests. If I change the permissions from "Users" to Any it works. This makes me believe there is a permissions error. How am I supposed to retrieve the url and display the url of images to enure it works with the set permissions of "Users"?

Cheers!

TL;DR
Issue: Developer is trying to display images in an Angular web app using URLs from a bucket but is getting a 404 error, likely due to permissions set to "Users." Solution: Check and adjust permissions for the images in the bucket to ensure they can be accessed by the Angular web app.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more