Obtenha Mimetype em 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];