0

I have tried looking around for an answer but all firebase download topics seem to be about just getting the download link from storage to display. I saw a similar one but it was in ios/swift and I didn't grasp it.

My question is if I already have the link and I am using it. How can a user click on a button and it will locally download on their computer?

I thought the would work but it just takes me to the image.

My download storage link from firebase are currently stored in my vuex store. I then access the url and other properties by pushing them to an array that is why the href is "card.imageurl[0]

<a @click="download" :href="card.imageurl[0]" class="download" download><i  class="material-icons">cloud_download</i></a>

I appreciate any help hopefully this is not a duplicate but I have tried looking around for a while on this.

Thanks

TheWardedCoder
  • 99
  • 1
  • 14
  • Are you asking how to [make the browser pop up a download dialog](https://stackoverflow.com/questions/23825871/how-to-force-a-download-file-prompt-instead-of-displaying-it-in-browser-with-htm)? – Frank van Puffelen Jan 25 '19 at 00:50
  • Yeah where the user can choose to accept the download and put the file where they want – TheWardedCoder Jan 25 '19 at 01:04
  • In that case, the question I linked should be what you need. This section in the documentation also seems relevant: https://firebase.google.com/docs/storage/web/download-files#cors_configuration – Frank van Puffelen Jan 25 '19 at 02:37

0 Answers0