AssetBundle Export / Import with "staticFiles" section

I’ve created a program to enable Asset Bundle Export / Import. In most cases it works fine to clone a dashboard or analysis from one environment to another. However I ran into a case where the authors embedded images in their analysis. This creates a “staticFiles” section within the asset bundle, but when I perform the import into the target location, the images are not shown in the target analysis / dashboard.

Does anyone know of a way to deal with this?

1 Like

Hello @kmaloney, the only option I can think of as a work-around to this would be to instead host those images on a public S3 bucket that the QuickSight dashboard would then access to display them. Then, if that S3 bucket is shared across each environment, then the image should be able to persist when you migrate the analysis/dashboard.

I’m not sure there is a work-around when it is a local image that is placed directly into the analysis. Let me know if that helps!

Thank you for the suggestion! I don’t think QuickSight allows you to point to external images on S3? From the authoring session the only option seems to be to upload an image from your local machine into the analysis.

However, I did discover some additional information. Apparently the embedded static images in the staticFiles section have names derived from UUID values, and those values appear to change when the export/import happens.

I suspect I will need to do something to figure out where those UUID image names are stored within the json that describes the analysis… from a super-quick analysis it looks something like this (partial):

      "images":[
          {
            "sheetImageId":"34d2aa0b-70d4-4edc-a9df-92744b1a358c",
            "source":{
              "sheetImageStaticFileSource":{
                "staticFileId":"33fe510b764244529995b81f5aac25cf"
              }
            }
          }
      ],

then the sheetImageId and staticFileId are pointers into the images stored in the staticFiles directory in the asset-bundle.qs file.

Sigh… sure wish this stuff was easier! :face_with_spiral_eyes:

Hello @kmaloney, that is interesting. If you search the JSON file for that fieldId, is that being referenced anywhere else?

Ultimately though, if you upload the image into an S3 bucket and make it public, you can use the link from S3 in a custom content visual to show the image that way. You can also use the image URL from a private S3 bucket by using CloudFront to establish the connection with QuickSight. I will include that documentation below:

If you go one of those routes though, you will either need to share access to that S3 bucket across environments, or create an S3 bucket in each environment and replace the URL that is referenced in the JSON when migrating.

That is the only option I can really think of at the moment to make this work. Let me know though if you find more information when searching for that fieldId.