5

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();
} 

1 Answers1

1

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.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89