Forum


Replies: 1   Views: 2581
Aws s3 and replacevariablebyhtml
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by michealorion  · 10-04-2017 - 14:17

I have to replace with replaceVariableByHtml an html code with a tag img src attribute where its going to aws amazon s3 bucket.

The image it's not visibile but all other i code is replaced correctly.

I was wondering if you were to create docx calls external libreries?

Thanks Riccardo

Posted by admin  · 10-04-2017 - 18:34

Hello,

phpdocx uses an internal class to download images when using replaceVariableByHtml. Please check that the downloadImages option is set to true, that images are publicy accesible (phpdocx uses file_get_contents, so this access can be done through any supported stream: HTTP, FTP...) and that the strem of the image can be accessed (if you are using an URL to access the image maybe you need to set a baseURL value).

Regards.