Expand my Community achievements bar.

How to change default value of expiration time in DAM-UI while sharing assets

Avatar

Level 3

Hi,

I have one query regarding sharing assets from DAM-UI. When we share assets so expiration time will get set for 24 hours by default. I need to change this value to 48 hours. Does anybody know from where can we change this default value.

Thanks in advance.

Lovepreet

4 Replies

Avatar

Level 8

You need to modify below js file.

/libs/dam/gui/coral/components/admin/adhocassetshare/clientlibs/adhocassetshare/js/adhocassetshare.js

Change add(1, days) to your default value and test.

$(document).on("asset-share-link-fetched", function (e) {

        // Fix this, avoid setTimeOut

        setTimeout(function () {

            $(".adhocassetshare-share-link").val(assetShareLink);

            $("#expirationDate")[0].valueAsDate = new Date(moment().add(1, 'days'));

            $("#sharelink").attr("readonly", "true");

            //retain the textbox border..

            $("#sharelink").css({

                "border-width":"1px",

                "border-style":"solid",

                "border-color":"#d0d0d0"});

           

        }, 3000);

    });

Avatar

Level 3

Hi ,

Thanks for the answer. I am able to change default expiration time. But expiration time is still configurable so do you know how we can disable this that user will not be able to select expiration time while sharing assets.

Avatar

Level 8

Apply read-only for below field

/libs/dam/gui/content/assets/adhocassetsharedialog/items/dialog/items/nameandexpiration/items/expirationdate