Zum Hauptinhalt gehen

Filetype value from the Media

Kommentare

2 Kommentare

  • Zendesk API User
    Author: felix_reinhold - 6/22/2018 12:09

    Hello Dragan,

    you have to check wether the element is a file or picture and then use the corresponding getExtension-function :

    $CMS_SET(set_Media, _download.Medium.getMedia())$

    $CMS_IF(set_Media.type==0)$

        $-- File --$

        $CMS_VALUE(set_Media.getFile(null).getExtension())$

    $CMS_ELSE$

        $-- Picture --$

        $CMS_VALUE(set_Media.getPicture(null).getPictureMetaData(#global.project.originalResolution).getExtension())$

    $CMS_END_IF$

    Fo rlanguage-dependant media provide the language at the getFile/getPicture method.

    Best regards

    Felix

    0
  • Zendesk API User
    Author: draganr - 6/22/2018 13:06

    Hello Felix,

    Thank you very much. It solved my problem.

    Best regards,
    Dragan

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.