You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating to Angular 16, (onFileDrop) stopped respecting async, the problem only happens when it comes from 'dropFiles' function, but when it comes from 'uploadFiles' it works normally
The text was updated successfully, but these errors were encountered:
fabiolucenaribas
changed the title
It is not respecting async after update angular 16
It is not respecting async after update
Jun 25, 2023
I found out why it used to work and now it doesn't work anymore, I noticed that in the 'checkFile' function
The section was commented:
// if ("getAsFile" in item) {
// const file = item.getAsFile();
// if (file) {
// this.addToQueue(
// this.getFakeDropEntry(file)
// );
// return;
// }
// }
because of this, 'webkitGetAsEntry' is being used, which really seems to me to be the most correct, but using it I am having problems reading the files because it is not respecting the async.
Interestingly, if instead of creating the NgxFileDropEntry directly passing the entry and starting to mount it through the getFakeDropEntry function it works normally, I don't know why, but it works for me
(entry as unknown as FileSystemFileEntry).file(file =>{
this.addToQueue(this.getFakeDropEntry((file as File)));
})
When updating to Angular 16, (onFileDrop) stopped respecting async, the problem only happens when it comes from 'dropFiles' function, but when it comes from 'uploadFiles' it works normally
The text was updated successfully, but these errors were encountered: