@olajhidey wrote:
I am having a bit issue with trying to convert my image to blob
file = "assets/imgs/profile.png" //this is the image to be changed to a blob let reader = new FileReader() reader.readAsArrayBuffer(file); reader.onloadend = (evt: any) => { let imgBlob = new Blob([evt.target.result], { type: 'image/jpeg' }); }
I am trying to upload the image to a REST API written in PHP laravel and its expecting the image in blob
Posts: 2
Participants: 2