Using the same file the "create" function works fine but I have troubles adding a page to an existing document using the "createPage" function, MangoPay returns:
{ [MangoPayError: Error: Invalid JSON] name: 'MangoPayError', message: [Error: Invalid JSON] }
The parameters passed to the function seem to be correct since the same request (copy-pasted) sent by Postman and cURL in the terminal returns a 204 no Content response as expected.
Hi,
Using the same file the "create" function works fine but I have troubles adding a page to an existing document using the "createPage" function, MangoPay returns: { [MangoPayError: Error: Invalid JSON] name: 'MangoPayError', message: [Error: Invalid JSON] }
The parameters passed to the function seem to be correct since the same request (copy-pasted) sent by Postman and cURL in the terminal returns a 204 no Content response as expected.
Here is a sample of the code:
if (mangoId) { mango.document.createPage({ UserId: me.user.Id, Id: mangoId, File: file }, callback); } else { mango.document.create({ UserId: me.user.Id, Type: type, File: file }, callback); }
Don't really know where it could come from...