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

Fix blob filename when retrieving blob from document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.1
    • Fix Version/s: 1.1, 2.2
    • Component/s: API
    • Backlog priority:
      300
    • Sprint:
      nxfit 8.3.6, nxfit 8.3.7, nxfit 8.4.2, nxfit 8.4.1
    • Story Points:
      3

      Description

      Version of the nuxeo java client

      Version : 0.1

      Current problem

      When fetching a blob via the nuxeo client :

      final NuxeoClient client = new NuxeoClient(url, username, password);
      final Document document = client.repository().fetchDocumentById(id);
      final Blob blob = document.fetchBlob();
      

      The filename set into the blob object corresponds to a temporary name like nx-3249828972020235203.tmp instead of the real filename set in the file:filename property of the document object.

      Possible solutions

      For consistency we could have two fields in the Blob class, one for the real filename and one for the temporary filename.

      Or we could just have one field with the real filename, which is what I do :

      final NuxeoClient client = new NuxeoClient(url, username, password);
      final Document document = client.repository().fetchDocumentById(id);
      final Blob blob = document.fetchBlob();
      // Update the filename
      blob.setFileName((String) document.getProperties().get("file:filename"));
      

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h