adias-file-uploader
File Uploader for Angular
see Demo here
Example:
app.module.ts
import { FileUploaderModule } from "adias-file-uploader";
FileUploaderModule.forRoot({
endPoint: "https://api.example.com/api/upload"
});
OR
FileUploaderModule.forRoot({
endPoint: "/upload"
});
app.component.html
<div ngxFilePicker (uploadSuccess)="onUploadSuccess($event)"></div>
OR
Custom file url can be also used
<div ngxFilePicker [fileUrl]="uploadedFileUrl" (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);
}