Uploaded image for project: 'Nuxeo Java Client'
  1. Nuxeo Java Client
  2. JAVACLIENT-74

Fix/check filename encoding issue in multipart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.1
    • Fix Version/s: 1.2, 2.8
    • Component/s: API
    • Sprint:
      nxfit 8.3.6, nxfit 8.3.7, nxfit 8.4.1
    • Story Points:
      3

      Description

      When using the operation Blob.Attach the filename is not correctly set in Nuxeo server for the uploaded file.

      • First reason would be a defect in retrofit client:

      https://github.com/square/retrofit/issues/1140

      • Second reason would be the missing conf variable for Nuxeo server:

      -Dmail.mime.decodeparameters=true

      A way to force the filename encoding is to play with headers:

      | +        # Quote UTF-8 filenames eventhough JAX-RS does not seem to be able
      | +        # to retrieve them as per: https://tools.ietf.org/html/rfc5987
      | +        quoted_filename = urllib.quote(filename.encode('utf-8'))
      | +        content_disposition = ("attachment; filename*=UTF-8''%s"
      | +                                % quoted_filename)
      | +        blob_part.add_header("Content-Disposition", content_disposition
      
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: