Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path is not separated from filename #13

Open
Anid4u2c opened this issue May 11, 2017 · 2 comments
Open

Path is not separated from filename #13

Anid4u2c opened this issue May 11, 2017 · 2 comments

Comments

@Anid4u2c
Copy link

Anid4u2c commented May 11, 2017

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...

  1. 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;

  2. 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> 
@sbeleidy
Copy link
Member

Would be happy to accept a pull request. Otherwise, will try to get to this soon.

Thanks for adding the issue.

@Anid4u2c
Copy link
Author

Thanks Saad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants