zafirus-uploader
v0.0.7
Published
## html use
Downloads
2
Readme
Uploader
html use
<lib-z-uploader id="uno" (handlerUpload)="upload($event)"> upload </lib-z-uploader>
css
::ng-deep lib-z-uploader .z-uploader {
border-radius: 5px;
border: 1px dotted #000;
}
::ng-deep lib-z-uploader .z-preview img {
width: 80px;
height: 80px;
}
interface
export interface ZFileUpload {
name: string;
base64: string;
}
ts
async upload(event: any) {
if (!event) return;
const base64 = event.base64.split(',')[1];
const url = await this.uploadService.uploadFileFromBase64(
base64,
event.name
);
console.log(url);
}