[ 
https://jira.nuxeo.com/browse/NXP-6370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Florent Guillaume updated NXP-6370:
-----------------------------------

    Status: Open  (was: Triage)

> Non-file Blob doens't set Content-Disposition header (bug in 
> MultipartInput.java)
> ---------------------------------------------------------------------------------
>
>                 Key: NXP-6370
>                 URL: https://jira.nuxeo.com/browse/NXP-6370
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>          Components: Web API (REST or WS*)
>    Affects Versions: 5.4.0.1
>            Reporter: Thorsten Klein
>            Priority: Major
>             Fix For: 5.4.1
>
>         Attachments: nuxeo-automation-client.diff
>
>
> 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.setFileName(blob.getFileName());
> +            }
>          }
>          part.setHeader("Content-Type", blob.getMimeType());
>          part.setHeader("Content-Transfer-Encoding", "binary");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to