{"action":"created","issue":{"url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/8","labels_url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/8/comments","events_url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/8/events","html_url":"https://github.com/pavelosipov/POSInputStreamLibrary/issues/8","id":129139383,"number":8,"title":"muti-photo upload","user":{"login":"williamluoweizhen","id":16289574,"avatar_url":"https://avatars.githubusercontent.com/u/16289574?v=3","gravatar_id":"","url":"https://api.github.com/users/williamluoweizhen","html_url":"https://github.com/williamluoweizhen","followers_url":"https://api.github.com/users/williamluoweizhen/followers","following_url":"https://api.github.com/users/williamluoweizhen/following{/other_user}","gists_url":"https://api.github.com/users/williamluoweizhen/gists{/gist_id}","starred_url":"https://api.github.com/users/williamluoweizhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamluoweizhen/subscriptions","organizations_url":"https://api.github.com/users/williamluoweizhen/orgs","repos_url":"https://api.github.com/users/williamluoweizhen/repos","events_url":"https://api.github.com/users/williamluoweizhen/events{/privacy}","received_events_url":"https://api.github.com/users/williamluoweizhen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-27T13:11:27Z","updated_at":"2016-01-28T04:58:46Z","closed_at":"2016-01-28T04:58:46Z","body":"Hi, Pavel Osipov,can I use POSInputStreamLibrary with AFnetworking to upload muti-photos instead of one photo?"},"comment":{"url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/comments/175977471","html_url":"https://github.com/pavelosipov/POSInputStreamLibrary/issues/8#issuecomment-175977471","issue_url":"https://api.github.com/repos/pavelosipov/POSInputStreamLibrary/issues/8","id":175977471,"user":{"login":"williamluoweizhen","id":16289574,"avatar_url":"https://avatars.githubusercontent.com/u/16289574?v=3","gravatar_id":"","url":"https://api.github.com/users/williamluoweizhen","html_url":"https://github.com/williamluoweizhen","followers_url":"https://api.github.com/users/williamluoweizhen/followers","following_url":"https://api.github.com/users/williamluoweizhen/following{/other_user}","gists_url":"https://api.github.com/users/williamluoweizhen/gists{/gist_id}","starred_url":"https://api.github.com/users/williamluoweizhen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williamluoweizhen/subscriptions","organizations_url":"https://api.github.com/users/williamluoweizhen/orgs","repos_url":"https://api.github.com/users/williamluoweizhen/repos","events_url":"https://api.github.com/users/williamluoweizhen/events{/privacy}","received_events_url":"https://api.github.com/users/williamluoweizhen/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T04:58:46Z","updated_at":"2016-01-28T04:58:46Z","body":"@bancek  my server's code is that \r\n`        public String uploadMedicalExaminationReport(String username, String examDate, String hospital, String description, MultipartHttpServletRequest request) throws IOException {\r\n        Map<String, MultipartFile> fileMap = request.getFileMap();\r\n        System.out.println(fileMap.size());\r\n        Set<String> keySet = fileMap.keySet();\r\n        for (String temp : keySet) {\r\n            MultipartFile multipartFile = fileMap.get(temp);\r\n            String newfilename = username + \"_\" + new Date().getTime() + \"_\" + multipartFile.getOriginalFilename();\r\n            String PathAndName = filePath + newfilename;\r\n            String saveUrl = savePath + newfilename;\r\n            File resultFile = new File(PathAndName);\r\n            try {\r\n                multipartFile.transferTo(resultFile);\r\n            } catch (IllegalStateException | IOException e) {\r\n                e.printStackTrace();\r\n                return \"fail\";\r\n            }\r\n            filePathList += (saveUrl + \";\"); //多个文件的路径之间用分号隔开\r\n        }\r\n｝\r\nand the app's code :\r\n- (void) uploadAsset:(ALAsset*)asset andAnother:(ALAsset*)anotherAsset toUrl:(NSString*)url progressBlock:(void (^)(long long bytesWriten, long long bytesTotal))progressBlock success:(void (^)(id responseObject))success failure:(void (^)(NSError* error))failure\r\n{\r\n    NSDictionary *parameter = @{@\"username\":@\"user1\",@\"examDate\":@\"2011-1-1\",@\"hospital\":@\"lwz\",@\"description\":@\"=======\"};\r\n    \r\n    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];\r\n    \r\n    AFHTTPRequestOperation *op = [manager POST:url parameters:parameter constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {\r\n        [self formData:formData appendAsset:asset fieldName:@\"file1\"];\r\n        [self formData:formData appendAsset:anotherAsset fieldName:@\"file2\"];\r\n    } success:^(AFHTTPRequestOperation * _Nonnull operation, id  _Nonnull responseObject) {\r\n        success(responseObject);\r\n    } failure:^(AFHTTPRequestOperation * _Nonnull operation, NSError * _Nonnull error) {\r\n        failure(error);\r\n    }];\r\n\r\n    [op setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {\r\n        progressBlock(totalBytesWritten, totalBytesExpectedToWrite);\r\n    }];\r\n}\r\n\r\nalmost the same to your code, but it can only upload one picture，it can't support Multiple photos. How to solve the problem if I dont't want to edit the server's code?"}}