Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ibm mobilefirst IBM MobileFirst Java适配器(混合应用程序)下载大型文件_Ibm Mobilefirst - Fatal编程技术网

Ibm mobilefirst IBM MobileFirst Java适配器(混合应用程序)下载大型文件

Ibm mobilefirst IBM MobileFirst Java适配器(混合应用程序)下载大型文件,ibm-mobilefirst,Ibm Mobilefirst,我正试图从MFP服务器中提取一个20MB的文件。因此,我在客户端应用程序中编写了以下代码 var resourceRequest = new WLResourceRequest("/adapters/AdapterExample/users/getUpdate",WLResourceRequest.POST); resourceRequest.send().then(function(result){

我正试图从MFP服务器中提取一个20MB的文件。因此,我在客户端应用程序中编写了以下代码

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);
                                    });
不幸的是,它以JSON格式显示以下错误:

JSON结果:{“isSuccessful”:false,“errors”:[“数据大小超过允许的最大值10Mb。”]}

对于数据大小不能超过10 MB的Java适配器,是否有任何数据大小限制

备注:下面的代码是我的Java适配器示例代码:

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

从MobileFirst的角度来看,Java适配器没有这样的文件大小限制。我建议考虑一个网络问题,比如一些供应商的请求通过了这个限制。

你好,Idan,我试着在Eclipse IDE中调用适配器,这个文件在屏幕上显示得很好。但在我的应用程序中调用时,它只显示上面提到的错误:-数据大小超过了允许的最大值10Mb。这似乎是MFP客户端的限制。你解决过这个问题吗?