AnsweredAssumed Answered

Accessing Container Data in PHP Custom Web Publishing

Question asked by User24618 on Aug 3, 2015
Latest reply on Jun 6, 2016 by CISDevTeam


Accessing Container Data in PHP Custom Web Publishing

Your post

Hi all,

I'm having issues with PHP CWP. The goal is simple: connect to a database, perform a find, arrange found records in a table.

Problems arise with the last part: The database has some externally stored container data (pdf files, for the purpose of this web-app). I'm looping through found records and using 'getContainerDataURL($record->getField('Doc Container'))' to provide the href for an <a>. getContainerDataURL() does create a link to the file but when clicked, FM Server (presumably) asks the user to log in again. Even though the connection is already made.

Obviously, I do not want to give random users the username and password used to log into the database. I was under the impression that when FM said that getContainerDataURL() creates "fully-qualified" URLs, it would just work without requiring signing in again. 

My question: how do I link to a file in a secure container without requiring a second authentication when the user "leaves" my PHP-CWP site to open the file. 

Any help is appreciated! Thank you! 

- Joseph