I'm using Filestack (aka filepicker.io) in my Angular 4 app. When I select a file (and before uploading that), it become uploaded automaticlly. So after I press Upload, I'll have 2 files uploaded. What am I doing wrong? :(
this is my code:
async showPicker() {
const client = filestack.init('MyApiKey');
const result = await client.pick({
fromSources: ['local_file_system', 'webcam', 'imagesearch', 'facebook', 'instagram', 'googledrive', 'dropbox', 'picasa'],
maxFiles: 1,
minFiles: 1,
transformations: {
crop: {
force: true,
aspectRatio: 1
}
},
accept: ['image/*']
});
const url = result.filesUploaded[0].url;
this.uploadedFileUrls.push(url);
}
P.S. I already checked this Filestack with Angular 2