0

I'm trying to download an image off Firebase Storage and convert it to base64. I have rules that you have to be authenticated but I get an error about Access-Control-Allow-Origin, related to CORS.

[Update]: researching the use of updateMetaDate() in firebase storage. https://firebase.google.com/docs/storage/web/file-metadata

Xerri
  • 4,916
  • 6
  • 45
  • 54
  • This is a pretty vague question as downloading from Firebase Storage, converting a file to base64 and CORS error messages are somewhat unrelated activities. Does it work when you disable Firebase rules and allow unrestricted access? Also, check your headers as I believe they need to be nested. See [Firebase Hosting](https://firebase.google.com/docs/hosting/url-redirects-rewrites) – Jay May 07 '17 at 15:08
  • Possible duplicate of [Firebase Storage and Access-Control-Allow-Origin](http://stackoverflow.com/questions/37760695/firebase-storage-and-access-control-allow-origin) – Mike McDonald May 08 '17 at 17:03
  • Thanks @MikeMcDonald but I am working on an Ionic application, meaning I have no domain. I will not disable the rules. As I said I am working on an Ionic application and I want the application to download images to save them to base64. The reason is to then save them in cache as base64 images. If you have any other solution let me know please – Xerri May 10 '17 at 14:49
  • @Xerri then please post code, errors, or additional information. Note that you can still have CORS issues in Ionic (http://blog.ionic.io/handling-cors-issues-in-ionic/) – Mike McDonald May 10 '17 at 16:28

0 Answers0