I used angular-file-upload directive for uploading my images.
.value('fileUploaderOptions', {
url: '/',
alias: 'file',
headers: {},
queue: [],
progress: 0,
autoUpload: false,
removeAfterUpload: false,
method: 'POST',
filters: [],
formData: [],
queueLimit: 20,
withCredentials: false
})
I want to set the queueLimit.
queueLimit: 5
works.
queueLimit: 20
-> max. queue length = 10.
Why?
Does the directive have min and max integers for parameter queueLimit
?
Actually I want no queue limit, so that the user can upload unfinitely many images.
note that queueLimit
in the 'fileUploaderOptions'
should be equal to Number.MAX_VALUE:
.value('fileUploaderOptions', {
url: '/',
alias: 'file',
headers: {},
queue: [],
progress: 0,
autoUpload: false,
removeAfterUpload: false,
method: 'POST',
filters: [],
formData: [],
queueLimit: Number.MAX_VALUE,
withCredentials: false
})
in order to set the limit of the queue, use uploder.filters
. example:
uploader.filters.push({
name: 'customFilter',
fn: function(item , options) {
return this.queue.length < 15; //set the queue length max value
}
});
Actually I want no queue limit, so that the user can upload unfinitely many images. set the function to return true always :
fn: function(item , options) {
return true;
}
in controller
var uploader = new FileUploader({ queueLimit: 1 });
then in the view.
< element nv-file-drop filters="queueLimit">