All uploaded files are saved to the phplive/web/file_attach/ directory. As a default, files are stored for 1 year (365 days) before it is automatically deleted.
The file store duration and the max upload file size can be updated at
- Login to your PHP Live! system as the Setup Admin.
- Click the top menu "Settings"
- Proceed to the "File Upload" sub menu
- Update, save and done!
Move the default file upload directory to another location. (Download Solution)
* not recommended, but the option is there
Note: If the default file upload directory (phplive/web/file_attach/) is moved to another location, the images will be processed as a base64 Data URI. There are some browser limits on the size of Data URIs. Please read the caniuse.com page for more information on the Data URI size limits for various browsers. Your website visitors may or may not be browsing with latest technology.
Keep in mind: DATA URIs are typically not cached because it is not an actual image but a data string representation of an image. A 1Meg image would be a very very very very large string representation of the image and it is loaded each time the image is accessed. If wanting to move the default file upload directory location, keep in mind this important factor.
PDF Data URIs are not support on IE browsers: IE browsers will not be able to process PDF Data URIs. If needing to upload PDF files, it is strongly recommended not to move the default file upload directory (phplive/web/file_attach/).
To change the the storage location of uploaded files to a different directory, here is what you will want to do:
- Create a new file Util_Extra.php inside the phplive/API/ directory containing the following variables:
NOTE: The "/new_directory/" is only an example. You will need to include the server full path of the new directory location.
IMPORTANT: The path name MUST be enclosed with single quotes ('). Double quotes (") enclosure will result in file path issues on some server environments.
$CONF["ATTACH_DIR"] = '/new_directory/file_attach' ;
- Save the file.
- You now should have phplive/API/Util_Extra.php that contains the above variable.
- Double check that the above directory has read/write permissions by the web server because the web will still need to upload file attachments there.