public BoxFile execute(final String fileId, BoxFilesManager manager, BoxFileUploadRequestObject requestObject) throws BoxServerException, BoxRestException,
AuthFatalFailureException, InterruptedException {
UploadNewVersionFileRequest request = new UploadNewVersionFileRequest(mConfig, manager.getObjectMapper(), fileId, requestObject);
try {
Object result = manager.getResponseAndParse(request, BoxResourceType.FILE_VERSIONS, manager.getObjectMapper());
BoxCollection versions = (BoxCollection) manager.tryCastObject(BoxResourceType.FILE_VERSIONS, result);
if (versions.getTotalCount() != 1) {
throw new BoxMalformedResponseException(request.getExpectedResponseCode());
}
return (BoxFile) versions.getEntries().get(0);
}
catch (BoxRestException e) {
if (isInterruptedMultipartException(e)) {
throw new InterruptedException();
}