Page 1 of 1

Encrypt file path cannot download txt file

Posted: Mon Oct 26, 2015 6:15 pm
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?


Re: Encrypt file path cannot download txt file

Posted: Tue Oct 27, 2015 4:41 pm
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)


Re: Encrypt file path cannot download txt file

Posted: Tue Oct 27, 2015 7:05 pm
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.


Re: Encrypt file path cannot download txt file

Posted: Mon Feb 22, 2016 5:48 pm
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.