Encrypt file path cannot download txt file

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mobhar
User
Posts: 11709

Encrypt file path cannot download txt file

Post by mobhar »

By default, PHPMaker 12 uses "Encrypt file path" from "Tools" -> "Advanced Settings".

If this setting is enabled, then the uploaded .txt files CANNOT be downloaded, but the others such as .zip, .pdf CAN be downloaded properly.
If this setting is disabled, then ALL the uploaded files (including .txt files) CAN be downloaded properly.

We use "Upload to Folder". We have checked to the upload folder, that the .txt files are uploaded properly, we can open the .txt file properly directly (not from the browser).

Thoughts?


arbei
User
Posts: 9370

Post by arbei »

You can add the extension "txt" to the constant EW_DOWNLOAD_ALLOWED_FILE_EXT in "ewcfg12.php" then try again.

define("EW_DOWNLOAD_ALLOWED_FILE_EXT", "pdf,xls,doc,xlsx,docx,txt", TRUE); // Allowed file extensions for download (non-image)


mobhar
User
Posts: 11709

Post by mobhar »

Thanks arbei. After adding the .txt extension, now it works properly.

Funny how the value of EW_DOWNLOAD_ALLOWED_FILE_EXT constant cannot be adjusted from PHPMaker side.


Hectic
User
Posts: 1

Post by Hectic »

arbei wrote:
You can add the extension "txt" to the constant
EW_DOWNLOAD_ALLOWED_FILE_EXT in "ewcfg12.php" then try again.

define("EW_DOWNLOAD_ALLOWED_FILE_EXT",
"pdf,xls,doc,xlsx,docx,txt", TRUE); // Allowed file extensions
for download (non-image)

Phew, thankfully adding .txt to the end of the file name actually worked. Thanks arbei.


Post Reply