@adias/file-uploader
(https://www.npmjs.com/package/ngx-flatpickrjs)
File Uploader for Angular
see Demo here
Example:
app.module.ts
import { FileUploaderModule } from "@adias/file-uploader";
FileUploaderModule.forRoot({
endPoint: "https://api.timberlinehelicharters.com/api/upload"
});
OR
FileUploaderModule.forRoot({
endPoint: "/upload"
});
app.component.html
<div ngxFilePicker (uploadSuccess)="onUploadSuccess($event)"></div>
Events
_function launched after picture successfully uploaded.
The value returned in $event
.
app.component.ts
onUploadSuccess(e: FilePickerRespnse) {
console.log("fileUrl ===", e.fileUrl);
console.log("fileName ===", e.fileName);
console.log("fileSize ===", e.fileSize);
}