Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
I have been trying to find a way to do this for DAYS!!!

Someone please help, the below gets me as far as a link to the URL of the file which I can download but I want to use this as the image source in the output document so it displays as an image.

trigger to get file url:
Code: Select all
$caseid = @=APPLICATION;

$results = executeQuery($query3) or die("Error in query: $query3");

if (is_array($results) and count($results) > 0) {
      $g = new G();
      @@receiptUrl = ($g->is_https() ? 'https://': 'http://') . $_SERVER['HTTP_HOST'] .
         '/sys' . @@SYS_SYS .'/'. @@SYS_LANG .'/'. @@SYS_SKIN . '/cases/cases_ShowDocument?a=' . $results[1]['APP_DOC_UID'] .
         '&v='. $results[1]['DOC_VERSION'];

$fullfileurl = @=receiptUrl . ".jpg";
@@fullfileurl = $fullfileurl;
@@panelhtml = '<img src="' . $fullfileurl . '"></img>';
 @@tablehtml = '<table background="' . $fullfileurl . '"><tr><td width="200" height="150"></td></tr></table>';
First, you need to include the code at the end inside the if clause.

Second, if you are using a recent version of PM, then you need to edit your env.ini file and add:
disable_download_documents_session_validation = 1
See: ... t_download ... estriction

Third, you need to change from:
$fullfileurl = @=receiptUrl . ".jpg";
$fullfileurl = @=receiptUrl ;
Thanks - tried the suggestions and no change.

I definitely get the correct URL for the file as I can click the link and download it but I cannot get the <IMG SRC="@=fullfileurl"></img> to display the image.

I did fine that the processmaker editor automatically puts the first part of the URL in which is why I also set the image as a table background but neither show the image still...
I don't know why it isn't working. I know that <src img="x"> works on my installation of PM (3.3.10 Community in Debian 9.5 with PHP 5.6.37).

Let's do a test. Import this process and run a case in it to see if the images appear in the output document: ... t_Document

Do the images appear?

Since the web site "" is down, can you please share with us the two processes in the links:

Can you please attach them in this post?

Kind Regrads.

Sometimes the data comes from a user, like when a […]

Found the solution here:[…]

Learn what's new in ProcessMaker 3.6! We are proud[…]

Hello, I have a case that appears both as comple[…]