I'm trying to pull a 20MB file from MFP server. So, I wrote the following code in my client application.
var resourceRequest = new WLResourceRequest("/adapters/AdapterExample/users/getUpdate",WLResourceRequest.POST);
resourceRequest.send().then(function(result){
Logger("Hello Im here ! : " + result.responseJSON.isSuccessful);
},function(error){
Logger("Im error ! : " + error);
});
Unfortunately, it shows the following error in JSON format:
JSON Result :{"isSuccessful":false,"errors":["Data size exceeds maximum permitted value of 10Mb."]}
Is there any data size limitation for Java adapter which data size cannot more than 10 MB?
Remarks: Code below is my Java Adapter sample code:
@POST
@Path("/getUpdate")
public String getUpdate() throws IOException{
JSONObject obj = new JSONObject();
java.nio.file.Path path = Paths.get("/Users/abc/Documents/example.zip");
byte[] fileData = Files.readAllBytes(path);
obj.put("fileName", path.getFileName().toString());
obj.put("size", Base64.encodeBase64String(fileData).length());
return obj.toString();
}
From MobileFirst-perspective, Java adapters impose no such file size limits. I suggest to consider a network issue, such as some vendor your request is going through that imposes this limitation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With