AnsweredAssumed Answered

PHP getContainerData() does not support remote containers ????

Question asked by RugenHeidbuchel on Feb 23, 2014
Latest reply on Oct 15, 2014 by RugenHeidbuchel

Title

PHP getContainerData() does not support remote containers ????

Your post

     I'm trying to display the image from a container field using the php API, every time I try accessing the data, I get the following error:

getContainerData() does not support remote containers

     Here's the code I use:

     
          foreach ($records as $imageRecord) {
     
           
     
          $url = urlencode($imageRecord->getField('Image'));
     
          echo '<img src="containerBridge.php?path=' . $url . '">';
     
          }

     The containerBridge.php file looks like this:

     
          <?php
     
          include("dbaccess.php");
     
           
     
          if (isset($_GET["path"])) {
     
           
     
          $url = $_GET["path"];
     
          $url = substr($url, 0, strpos($url, "?"));
     
          $url = substr($url, strpos($url, ".") + 1);
     
           
     
          if ($url == "jpg") {
     
          header('Content-type: image/jpeg');
     
          } elseif ($url == "gif") {
     
          header('Content-type: image/gif');
     
          } else {
     
          header('Content-type: application/octet-stream');
     
          }
     
           
     
          echo $fm->getContainerData($_GET["path"]);
     
          }
     
          ?>

     I tried searching the internet for answers, but there's no info at all! I hope someone can help me...!

     Thanks in advance,
     Rugen Heidbuchel

Outcomes