Uploaded image for project: 'Magnolia DAM Module'
  1. Magnolia DAM Module
  2. MGNLDAM-817

Asset names created from duplication action may create misleading asset types


    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.0.4
    • None
    • None
    • None
    • Yes
    • UI FW 10
    • 5


      When uploading an asset, the user has to create asset name. If one recopies the full filename of the file being uploaded, then the file type will be part of the asset (node) name:

      Example asset: Apollo 13 - Houston, We've Had a Problem-172374191.mp3

      The issue

      However, the current mechanism for creating names of duplicated assets negatively affects surface semantics of asset types. If the editor decided to duplicate this asset, he gets .mp4 and ** .mp5 ... and so on:

      instead of something like:

      Apollo 13 - Houston, We've Had a Problem-172374191-0.mp3


       When duplicating an asset, the asset names should be parsed for the


       pattern and only the <filename> part should be altered:

      • <filename>-0<.><extension>
      • <filename>-1<.><extension>
      • <filename>-2<.><extension>

      Parsing for all the possible extensions could be a problem: [https://en.wikipedia.org/wiki/List_of_filename_extensions


      Dev notes

      We would not achieve <filename>-0<.>.<extension>in case where filename ends with a number. In the Houston example we will end up with 

      Apollo 13 - Houston, We've Had a Problem-172374192.mp3

      This is to be expected though, can be documented. 

      We can use for Dam assets the getUniqueName from NodeNameHelper.

      Consider also, that the duplicated asset can have a nodename/asset name named completely differently than the file name, so then we would not be going for 

      • <filename>-0<.><extension>

      but rather

      • <assetname>-0<.><extension>

        Acceptance criteria

              mhaderka Martin Haderka
              mdrapela Martin Drápela
              0 Vote for this issue
              3 Start watching this issue


                  Task DoD