Forum


Replies: 1   Views: 322
.htaccess and images
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 admin  · 23-01-2024 - 07:39

Hello,

UPDATE: phpdocx 15 includes a streamContext option to set a stream context to download images from HTML.

Yes, phpdocx needs public images to be able to download and add them to the document.

Maybe you could add an exception in the htaccess and protect all IPs but the public IP where phpdocx runs. Or generate a custom script that downloads the HTML with the images from your server, and then add this content using phpdocx methods.

The testing branch includes a new option in embedHTML and replaceVariableByHTML to set a stream context when downloading the images. This option could be used to set a stream context with the required HTTP authorization. Please note that this option is not available in the current stable release, and only users with active LUS can get testing features.

Regards.