Closed angelopedroso closed 4 months ago
How I could create a media ID from a File Object?
file: { fieldname: 'example', originalname: 'example.png', encoding: '7bit', mimetype: 'image/png', buffer: <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 90 00 00 00 b2 08 06 00 00 00 6c ac 99 45 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 ... 60191 more bytes>, size: 60241 }
I convert the file object to Blob, and fix it
Yeah, unfortunately the API doesn't support the File type, so Blob is the only solution
How I could create a media ID from a File Object?