Downloading variants from the browser

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 12:23

You may want to to have a menu command that pulls an image to the computer they are working on in a specific resolution. In this case, it would create a Web variant if it doesn’t exist and then allow the user to open or save it to their computer.

The menu entry, where in the pars you need to specify the variant name and the attribute containing the original, that is “low” for img objects, and “data” for image objects:

       <menuItem

                                 text="Download Img Web variant"

                                 iconUrl="do.ashx?Cmd=Icon&amp;Name=tlb_Publish&amp;Size=16&amp;Default=t"

                                 navigateUrl="javascript:this.menuWebPart.showDialog('WFForm.aspxwf=downloadVariant&amp;Ids='+this.menuWebPart.selectedIdList()+'&amp;pars=variantName:jpg-400;dataAttrName:low;',null,820,650);"

                                 enable="Some"

                         />

 

The result is a zip file if user selected multiple img items, or the link to the single one selected.

Variants are created if not already there.

Click to toggle expandInstalling
Click to toggle expandThe workflow