queued items appears on all pl-upload queues
ashrafhasson opened this issue · 5 comments
ashrafhasson commented
Hi there,
I have the following template snippet that allows uploading a few images per post but it appears to me that the queued items reappear when viewing another post item (i.e., when navigating away to another post). I must be doing something wrong or fail to understand the use case, any help is appreciated.
{{#pl-uploader for=(concat "upload-image-" vehicle.id) name=vehicleEdit extensions="jpg jpeg png gif" onfileadd="queueImageForUpload" as |queue dropzone|}}
<div class="dropzone" id={{dropzone.id}}>
{{#if dropzone.active}}
{{#if dropzone.valid}}
Drop to upload
{{else}}
Invalid
{{/if}}
{{else if queue.length}}
Uploading {{queue.length}} files. ({{queue.progress}}%)
{{else}}
<p>
{{#if dropzone.enabled}}
Drag and drop images onto this area to upload them or
{{/if}}
<a id="upload-image-{{vehicle.id}}">Add an Image.</a>
</p>
{{/if}}
</div>
{{/pl-uploader}}
Thanks,
tim-evans commented
What is the value for vehicleEdit
?
ashrafhasson commented
Just a random text value set in the controller, I've set it to "test"
On Fri, Feb 17, 2017, 2:10 PM Tim Evans ***@***.***> wrote:
What is the value for vehicleEdit?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB1JsvE4q92RlysS_QIRVFATrYcrw113ks5rdfCagaJpZM4MEmfI>
.
--
Thanks,
Ashraf Hasson
tim-evans commented
Ahh, that value requires to be unique per page. If the name
of the queue is "test"
, then it will share state with all others.
ashrafhasson commented
Thanks @tim-evans that was it, sorry for creating an issue for this minor thing, but it wasn't so apparent to me at least. Btw, thanks for the great addon :)
tim-evans commented
No problemo!