Open hemanth opened 8 years ago
On media/upload with fs.readFileSync('./image', { encoding: 'base64' })
media/upload
fs.readFileSync('./image', { encoding: 'base64' })
I am getting:
{ request: '/1.1/media/upload.json', error: 'media type unrecognized.' }
Due to which I get the below error on media/metadata/create:
media/metadata/create
{ [Error: Missing json payload.] message: 'Missing json payload.', code: null, allErrors: [ { request: '/1.1/media/metadata/create.json', error: 'Missing json payload.' } ], twitterReply: { request: '/1.1/media/metadata/create.json', error: 'Missing json payload.' }, statusCode: 400 }
P.S: The image is fine, it does render properly in the browser.
I encounter the same problem
Make sure to remove the prefix, e.g. data:image/jpeg;base64, first!
data:image/jpeg;base64,
On
media/upload
withfs.readFileSync('./image', { encoding: 'base64' })
I am getting:
Due to which I get the below error on
media/metadata/create
:P.S: The image is fine, it does render properly in the browser.