-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.4.0.1
-
Component/s: Web API (REST or WS*)
In case the datasource is not a file the filename isn't set (Content-Disposition header). Therefore the filename in Nuxeo isn't shown althought it is set in the Blob object.
I created the patch attached to check if the filename is set in the blob and set the header in case.
— Documents/Projects/nuxeo-features/nuxeo-automation/nuxeo-automation-client/src/main/java/org/nuxeo/ecm/automation/client/jaxrs/util/MultipartInput.java 2011-02-14 14:45:15.353754200 +0100
+++ Documents/Projects/nuxeo-automation-client/src/main/java/org/nuxeo/ecm/automation/client/jaxrs/util/MultipartInput.java 2011-02-14 09:53:03.401306800 +0100
@@ -55,6 +56,10 @@ public class MultipartInput extends Mime
part.attachFile(((HasFile) blob).getFile());
} else {
part.setDataHandler(new DataHandler(new BlobDataSource(blob)));
+
+ if (blob.getFileName() != null)
}
part.setHeader("Content-Type", blob.getMimeType());
part.setHeader("Content-Transfer-Encoding", "binary");