Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Brohus 163 posts 401 karma points
    22 days ago
    Anders Brohus
    0

    Get Absolute Url to media item - Component V8

    Hi Our :)

    Is it possible to get an absolute URL to an media item inside an component?

    I wanna make an request to the ReSmush.It Web Service and they accept this,

    For a standard call, with a JSON response, you just have to call this url http://api.resmush.it/ws.php and provide the image attribute like one of these options below :
    
    GET Parameter "img"
    POST Parameter "img"
    FILES binary sent "files"
    The webservice will return an array of informations about the compressed image (see below)
    

    So i'm thinking about just giving them the absolute image url, or should i go with the FILES option?

    If you would go with the FILES option how would you do that?

    Kind regards, Anders

  • Shaishav Karnani from digitallymedia.com 289 posts 1277 karma points
    21 days ago
    Shaishav Karnani from digitallymedia.com
    0

    Hi Anders,

    You need to setup domain in culture and hostnames and then call mediaItem.UrlAbsolute() to get Absolute URL in v8.

    Hope that will assist.

    Regards,

    Shaishav

  • Anders Brohus 163 posts 401 karma points
    21 days ago
    Anders Brohus
    0

    Hi Shishav,

    UrlAbsolute is obsolete in V8.1 .. :)

    But i can't get the correct URL method inside my component :/

  • Shaishav Karnani from digitallymedia.com 289 posts 1277 karma points
    21 days ago
    Shaishav Karnani from digitallymedia.com
    0

    Hi Andres,

    In that case, please can you try mediaItem.Url(mode:UrlMode.Absolute)

    Hope this helps.

    Cheers,

    Shaishav

Please Sign in or register to post replies

Write your reply to:

Draft