Reputation: 1683
I drag a PDF file from my computer using ngx-file-drop
.
The object I get is UploadEvent, does anyone know how I can convert it to an File object?
Upvotes: 1
Views: 2713
Reputation: 7289
Read the docs. There is a plain and simple example. https://www.npmjs.com/package/ngx-file-drop
public dropped(event: UploadEvent) {
this.files = event.files;
for (const droppedFile of event.files) {
...
}
}
Upvotes: 1