Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

lovepreetk75597
Level 3
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
raj_mandalapu
Community Advisor
Community Advisor

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);

    });

lovepreetk75597
Level 3
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.

raj_mandalapu
Community Advisor
Community Advisor

You need to make date-time picker as read-only.

Thanks

Raj.

raj_mandalapu
Community Advisor
Community Advisor

Apply read-only for below field

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