Dapatkan mimetype di javascript
const body = {profilepic:e.target.result};
let mimeType = body.profilepic.match(/[^:]\w+\/[\w-+\d.]+(?=;|,)/)[0];
Lonely Lapwing
const body = {profilepic:e.target.result};
let mimeType = body.profilepic.match(/[^:]\w+\/[\w-+\d.]+(?=;|,)/)[0];