1 2 Previous Next 18 Replies Latest reply on Feb 28, 2016 5:02 PM by bigtom

    Issue with CWP and images.

    bigtom

      So I searched around and found that others have had this problem but only end up saying the advice they received did not work but they solved the issue somehow. Not helpful.

       

      fmxml is enabled for the user in security.

       

      Container is internal storage. When I use:

      <IMG src=”img.php?-url=<?php echo urlencode($record->getField('Image')); ?>”>

      <?php

      echo $fm->getContainerData($_GET['-url']);

      ?>

       

      I get and error: "getContainerData() does not support remote containers". This is odd as it is not a remote container.


      When I use the following for the container as internal or external storage I get a URL with a broken image.


      echo '<img src="'.$fm->getContainerDataURL($record->getField('Image')) .'">';


      The URL is in this format: server.com/fmi/xml/cnt/P2120025.jpg?-db=test&-lay=cwp&-recid=3544&-field=Image(1)



      I tried using the containerbridge.php and that worked but did not.

      in the test file:

      echo '<img src="containerbridge.php?path=' . urlencode($record->getField('Image')) . '">';

      and in containerbridge.php

      echo $fm->getContainerData($_GET['path']);


      This gave me same error "getContainerData() does not support remote containers", it also displays the image properly. How is that happening? Pretty much looks like a mess to me.



        1 2 Previous Next