Mashape don't give me any support unless its working hours so i hope you can give me some answers
I'm trying to upload a file throught my API.
Dose anyone know why mashape generates this kind of error? what it means or how to fix it or avoid it. Its not coming from my server. And It's not something my API would ever return. Making a request directly to my API works as it should!
[body] => {"message":"Ops, an error occurred (╯°□°)╯"}
[status] => 500 Internal Server Error
[headers] =>
access-control-allow-credentials:true
Connection:keep-alive
Content-Length:54
Content-Type:application/json
Date:Sun, 23 Aug 2015 18:34:27 GMT
Server:Mashape/5.0.6
X-Mashape-Proxy-Response:true
To me it seems like its a problem with Mashapes proxy?
EDIT
Some more investigation shows me that it has to do with the size
var content = "kokokoko".repeat(1200); // Uploading a small file works fine
// var content = "kokokoko".repeat(1300); // Uploading a larger file produce the error above
var fd = new FormData();
fd.append("format", 'ttf');
fd.append("file", new Blob([content]), "filename.ext");
$.ajax({
url: 'https://ofc.p.mashape.com/directConvert/',
headers: {'X-Mashape-Key': 'xxxxx'},
method:"post",
data: fd,
cache: false,
contentType: false,
processData: false,
})
EDIT 2
It works now, but still doesn't explain the message Ops, an error occurred (╯°□°)╯
means