dynamically initialize uploader instances #1013
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
when click a + button I need to init a new uploader instance.
http://prntscr.com/ja18l4
check
Maybe you can use the:
<input type="file" ng2FileSelect [uploader]="uploader" />And all these point to the same 'uploader' instance. As the uploader instance uses a queue to upload files. So the each ng2FileSelect is used to add a file to that single queue.
Yes that is a good solution.But in my case I need to display separate uploading progress bars to each boxes.If I use one queue Its difficult to display separate uploading boxes to each dynamic boxes.
@pasangears I assume it should be an array and if you have one input points to same uploader, then it will duplicate your uploaded image/file. You can initialize the uploader dynamically inside the function which happens when you click the button. So whenever you click a + button, an uploader instance will be initialized and each will carry out separate upload process. Make sure you point the uploader with the correct index of the array.