Uploaded image for project: 'External DAMs'
  1. External DAMs
  2. EXTDAM-326

S3 Provider Asset Reference Resolver not returning accurate metadata

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Normal
    • None
    • None
    • None
    • None

    Description

      Steps to reproduce

      1.  Create a link to an S3 asset within content (see attached image jcr) (this requires using the s3 external dam connector)
      2.  Try to retrieve this content via a delivery endpoint (see attached image endpoint) with this s3 link resolved and metadata included

      Expected results

      1. The @link node has the s3 URL with a datetimestamp appended to it. The timestamp is equal to date-modified
      2. Under "metadata"

      • "fileSize": shows proper filesize
      • "height": shows proper height
      • "width": shows proper width
      • "date": Time.now
      • "created": date created
      • "modified": date modified

      Actual results

      1. The @link node has the s3 URL with a datetimestamp appended to it. The timestamp is equal to time.now
      2. Under "metadata"

      • "fileSize": shows 0
      • "height": shows 0
      • "width": shows 0
      • "date": Time.now "2021-11-04T20:07:17.809Z",
      • "created": Time.now "2021-11-04T20:07:17.809Z",
      • "modified": Time.now "2021-11-04T20:07:17.809Z"

      Example:

      "albumImage": {
      "@name": "LCWorship_Gloria_AlbumImage.jpg",
      "@path": "magnolia-cms-live/Media/Worship/gloria/LCWorship_Gloria_AlbumImage.jpg",
      "@id": "s3:magnolia-cms-live/Media/Worship/gloria/LCWorship_Gloria_AlbumImage.jpg",
      "@link": "https://magnolia-cms-live.s3.amazonaws.com/Media/Worship/gloria/LCWorship_Gloria_AlbumImage.jpg?1636056437809",
      "metadata":

      { "fileName": "LCWorship_Gloria_AlbumImage.jpg", "mimeType": "image/jpeg", "fileSize": "0", "height": "0", "width": "0", "format": "image/jpeg", "source": "magnolia-cms-live/Media/Worship/gloria/LCWorship_Gloria_AlbumImage.jpg", "date": "2021-11-04T20:07:17.809Z", "created": "2021-11-04T20:07:17.809Z", "modified": "2021-11-04T20:07:17.809Z" }

      }

      Workaround

      None that I could find.

      Development notes

      Ideally, the customer will be able to configure whether or not they want to retrieve this metadata with each asset reference.

      The use case for this is two-fold
      1. a proper cache buster for the image but updating the proper the date-time stamp on the URL (ie ".jpg?1636056437809")
      2. Utilizing the width and height values to best represent the image in HTML.

       

      One additional note is that the metadata is present on the S3 assets within the Assets app. See attached image assets app. This seems to be resolved here:

      https://git.magnolia-cms.com/projects/ADDON/repos/external-dams/browse/magnolia-external-dam-s3/src/main/java/info/magnolia/external/dam/s3/datasource/AbstractS3Item.java

       

      Checklists

        Acceptance criteria

        Attachments

          1. assests app.png
            assests app.png
            209 kB
          2. endpoint.png
            endpoint.png
            228 kB
          3. jcr.png
            jcr.png
            79 kB

          Issue Links

            Activity

              People

                Unassigned Unassigned
                lstaniorski Leah Staniorski
                AuthorX
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoD