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

file.read() does not show the progress % #132

Open
rinoldsimon opened this issue Aug 5, 2018 · 0 comments
Open

file.read() does not show the progress % #132

rinoldsimon opened this issue Aug 5, 2018 · 0 comments

Comments

@rinoldsimon
Copy link

i want to preview image before calling file.upload(). So in the uploadImage function i just read the file and display in my browser. queue.progress % remains 0 even after image displayed in browser.

Does queue.progress only works when calling file.upload() ?

hbs

{{#pl-uploader for="profile-image" name="profile-image" extensions="jpg jpeg" max-file-size="5000000" onfileadd="uploadImage" as |queue|}}
   {{#if queue.length}}
     {{!-- image preview --}}
     <img id="profile-image" src={{profile_photo}}/>
       Uploading..{{queue.progress}}%
   {{/if}}
 {{/pl-uploader}}

js

    uploadImage(file) {
      file.read().then((url) => {
        this.set('profile_photo', url);
      }, (reason) => {
       ...
      });
    }
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

1 participant