84
rated 0 times
[
90]
[
6]
/ answers: 1 / hits: 30478
/ 6 Years ago, wed, september 12, 2018, 12:00:00
I would upload the file in Angular using upload component
Here's my HTML:
<p-fileUpload mode=basic name=demo[] customUpload=true accept=image/* maxFileSize=1000000 (uploadHandler)=upload($event)></p-fileUpload>
in my ts I print param value
upload(event) {
console.log(event)
}
I get only metadata and not blob content
{files:[{objectURL:{changingThisBreaksApplicationSecurity:blob:https://prime-ng-file-uploading.stackblitz.io/d429e761-c391-45fa-8628-39b603e25225}}]}
I would also get file content to send via API to the server
More From » angular