Back

Storage permission issues with Ionic/Angular Android App

  • 0
  • Self Hosted
  • Android
  • Storage
_alnes_
31 Mar, 2025, 11:09

Hello,

I use Ionic/Angular with Appwrite to run a PWA.

I use Appwrite Auth, Database, Function and Storage, and everything runs fine.

If I build an Android app with Ionic, all Appwrite services (Auth, Databse and Function) work except for the storage. Storage is: user:read permission. I want to display images from the storage in the user area (via Ionic Components or Html tags). I can't get it to work in android -> Unless I set the permissions in the storage to any:read.

The app probably runs in the native android app in the webview on a localhost. (I have a wildcard hostname in Appwrite). This is also shown by the natural message from Appwrite regarding locim copycat from android.
Will this be a Cors problem ?

If I set the capacitor server url directly to my webapp, everything works again, but I lose the advantages of the Android Native App (because then I only have a webview on a website).

Any ideas to help me with that ?

Best regards Matthias

TL;DR
Developers facing storage permission issues with Ionic/Angular Android app using Appwrite services. All services are working except for storage which requires 'user:read' permission. To display images, permissions need to be set to 'any:read'. Possible CORS issue due to app running in webview on localhost with wildcard hostname. Setting capacitor server URL directly to webapp solves issue but loses Android Native App advantages. Solution: Check and adjust CORS settings and consider alternatives for displaying images.
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