Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2017-06-06 22:04:13

Tilak
Member
Registered: 2017-03-03
Posts: 3

Downloads.GetMultiLink API - how to restrict image size

Iam using Downloads.GetMultiLink API by restricting width and height to 256 by pass values in API body. But iam facing issue in dowloading images smaller than 256X256

API Body as bellow:
{
                  "apiVersion": "1.0.1",
                  "sessionId": "p38l2yY1DKdK6eG7nR2qnwQmkjlflOXg",
                  "action": "Downloads.GetMultiLink",
                  "inParams": {
                                    "assetIds": [
                                                      "34970966374",
                                                      "34970967598"
                                    ],
                                    "settings"  :
                                    {
                                        "width":256, "height":256
                                    }
                  }
}


Error for images lesser than 256X256
"action": ACTION_NOT_PERMITTED
"debug" :"cannot download larger than original"

Regards,
Tilak

Offline

#2 2017-06-13 10:26:48

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 79

Re: Downloads.GetMultiLink API - how to restrict image size

Hi Tilak,

The issue is that, IMS will not normally create images larger than the original. However, there is a feature of the GetLink()/GetMultiLink() API calls that would allow this to work. If you add:

"fit":"pad"

to the settings, then the call will work and your tiny images will be returned in a 256x256 frame.

hth
Ben

Offline

Board footer