cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Template Literal String to Reference Attachment FileID in Advanced Print Views

Template Literal String to Reference Attachment FileID in Advanced Print Views

Hello Autodesk Community,

This Idea is being submitted on behalf of Brett Hartt with iFixit.

 

Current Fusion Lifecycle Version: 11.06.02.28

 

The current configuration of the Attachments Widget in the Advanced Print View makes it impossible to resize Attachment photos. Currently, it is possible to resize images from the Item Details Tab via Advanced Print View using the method described here. But this method is impossible for Attachments due to a limitation set by the Template Literal String used to reference the Attachment Thumbnails.

 

In the link above, it's shown that images within the Item Details tab are referenced via Template Literal String ( ${} Notation) using "${item.itemDetails.sections["[InsertSectionName]"].fields.IMAGE.value} " which points to the imageID used in the path "/servlets/ImageServlet/?imageid=" to download the image file. This allows you to simply place the Template Literal String at the end of the path like so: "/servlets/ImageServlet/?imageid=${item.itemDetails.sections["Product Design"].fields.IMAGE.value}" so that the Print view downloads the image file. This makes it easy to add HTML tags like "<img>" and height values to resize the produced image.

 

The Attachment Thumbnail Template Literal String "${attachment.thumbnail.value}" processes into the Attachment Download link, complete with HTML Tags like so: <img src="/servlets/DownloadFile/[InsertUnnecessaryFileName]?fileID=287&amp;dmsID=6829&amp;workspaceID=57">

 

Since this HTML code is provided by the server after the Template Literal String is processed, there is no way to add a "height" value or any other modifications via HTML Tags. It would be favorable to be able to reference ONLY the FileID for the Attachment via Template Literal String (Something like ${attachment.thumbnail.fileID.value}) so that you can wrap it in the download path and HTML Tags like so: <img src="/servlets/DownloadFile/?fileID=${attachment.thumbnail.fileID.value}" height="[RandomValue]">

 

Alternatively, allowing a reference to alternative sizes of each Attachment Thumbnail may prevent the client from downloading the entire thumbnail before they resize it with HTML Tags. This would reduce load-times.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report