gfpdf_tmp_location
Jump To Section
Description
By default temporary files Gravity PDF creates are stored in the tmp
folder inside the PDF working directory. As we discussed in the PDF security documentation this directory is protected from direct access by a .htaccess
file. However, this only works for web servers running Apache or Litespeed. This filter allows you to move this folder to a private directory that isn't accessible from the web, ensuring your PDFs stay private.
Note: your web server needs write access to the folder you move this directory to.
Parameters
$path | string
: The path to the tmp
folder.
$working_folder | string
: The working directory folder name. By default this is PDF_EXTENDED_TEMPLATES
.
$upload_path | string : The path to your uploads directory (where the PDF working directory is stored by default).
Usage
The following snippet shows you how you can move the PDF temporary directory to a private folder that's not accessible through a browser:
Once you've verified the filter works correctly you should manually remove the old directory.
Source Code
This filter is located in the Model_Install::setup_template_location()
method of /src/model/Model_Install.php
.