When uploading from local storage: I was hoping to have a choices of manually naming (current implementation), automatically generating a filename for the image, or pulling the filename from the file.
Here is what I did to get the filename of the image, from local storage...
-
In /file-fire/file-fire-behavior.html
Updated _uploadNext and changed the following from:
var name = this.path;
to:
var name = this.path + files[i].name;
-
With the previous edit to the existing code, the configuration only requires the path and the name is automatically set by the existing filename:
<file-fire app-name="app" path="/images/"
From the code supplied in the demo, I was able to output the name (see [[item.name]] in addition to the download-url (see [[item.url]]):
<br><br>URl's: <br>
<template is="dom-repeat" items="{{downloadUrl}}">
[[item.url]]
<br/>
[[item.name]]
</template>
<br> <br>
When uploading from local storage: I was hoping to have a choices of manually naming (current implementation), automatically generating a filename for the image, or pulling the filename from the file.
Here is what I did to get the filename of the image, from local storage...
In /file-fire/file-fire-behavior.html
Updated _uploadNext and changed the following from:
var name = this.path;to:
var name = this.path + files[i].name;With the previous edit to the existing code, the configuration only requires the path and the name is automatically set by the existing filename:
<file-fire app-name="app" path="/images/"
From the code supplied in the demo, I was able to output the name (see [[item.name]] in addition to the download-url (see [[item.url]]):