unable to turn off Auto Upload for ng2FileSelect #1130

Open
opened 2019-11-27 15:18:14 +00:00 by paulson-g · 1 comment
paulson-g commented 2019-11-27 15:18:14 +00:00 (Migrated from github.com)

I'm creating a file upload as below in my component.html
<input type="file" ng2FileSelect [uploader]="uploader" #file hidden multiple accept=".zip,.DLRLE,.DLARM" />

and then initializing it in the .ts

public uploader: FileUploader;
this.uploader = new FileUploader({
url: this.configuration.Server() + URL,
autoUpload : false,
disableMultipart: false,
});

however its still sending the file to my controller as soon as i hit open on the file selector. am i setting the autoupload incorrectly?

I'm creating a file upload as below in my component.html <input type="file" ng2FileSelect [uploader]="uploader" #file hidden multiple accept=".zip,.DLRLE,.DLARM" /> and then initializing it in the .ts public uploader: FileUploader; this.uploader = new FileUploader({ url: this.configuration.Server() + URL, autoUpload : false, disableMultipart: false, }); however its still sending the file to my controller as soon as i hit open on the file selector. am i setting the autoupload incorrectly?
deshack commented 2019-12-01 18:07:50 +00:00 (Migrated from github.com)

Hi @paulson-g,
although the option is set correctly, try not to set autoUpload since false is its default value.
It should work as you expect.

If not, check if you trigger some kind of event when you select a file from the selector.

Hi @paulson-g, although the option is set correctly, try not to set `autoUpload` since `false` is its default value. It should work as you expect. If not, check if you trigger some kind of event when you select a file from the selector.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#1130