Skip to main content
Known Participant
August 11, 2022
Question

How to provide the absolute path for any image inside ~/Library path/../../../../image.ai

  • August 11, 2022
  • 1 reply
  • 122 views

Function startImage() {

//alert(UserName);

UserName= "setu";

 

    var csInterface = new CSInterface();

    updateThemeWithAppSkinInfo(csInterface.hostEnvironment.appSkinInfo);

    // Update the color of the panel when the theme color of the product changed.

    csInterface.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT, onAppThemeColorChanged);

    evalScript('FindRendom()', function(result) {

        document.getElementById('time').innerHTML = "<img src='/Users/"+UserName+"/Library/Application Support/Adobe/CEP/extensions/EdlPlugin/Shoes_template/shoes"+result+".jpg'>";

This topic has been closed for replies.

1 reply

Community Expert
August 15, 2022

You have written the code, what happens with it? Do you get an error. use a console.log to see what path is formed to identify if it is correct or not. Try the following as well

function startImage() {
    //alert(UserName);
    UserName = "setu";
    var csInterface = new CSInterface();
    updateThemeWithAppSkinInfo(csInterface.hostEnvironment.appSkinInfo);
    // Update the color of the panel when the theme color of the product changed.
    csInterface.addEventListener(CSInterface.THEME_COLOR_CHANGED_EVENT, onAppThemeColorChanged);
    evalScript('FindRendom()', function (result) {
        const path = `<img src="/Users/${UserName}/Library/Application Support/Adobe/CEP/extensions/EdlPlugin/Shoes_template/shoes/${result}.jpg">`
        document.getElementById('time').innerHTML = path;
    })
}

-Manan

-Manan