Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-10565

Use the right field to check if a document exists with a given file name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6
    • Fix Version/s: 5.6.0-HF06, 5.7.1
    • Component/s: None

      Description

      To check if a document exists with a given file name, FileManagerUtils#getExistingDocByFileName uses "file:filename", whereas it should use the "file:content/name" sub-property, which we can always rely on.

      Indeed, currently when uploading an image with the same file name as an existing one in a given folder using the "Import a file" button, a new document is created instead of a new version of the existing document. This happens because the check is done on "file:filename" which is not set in the case of an image (see image_widget_template.xhtml).
      Yet it works with a regular file because this field is set, see extended_file_widget.xhtml.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ataillefer Antoine Taillefer
                Reporter:
                ataillefer Antoine Taillefer
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h