Page 1 of 2
Download doc/docx files unreadable
Posted: 14 Dec 2020, 21:53
by lopezan
I use PhocaDownload (last version) on Joomla 3.9.23.
When i try to download doc/docx files, all of this are unreadable. If I download and open it from ftp or without using PhocaDownload, it are perfectly readable.
Can anyone help me?
Thanks and regards.
Angelo
Re: Download doc/docx files unreadable
Posted: 14 Dec 2020, 22:53
by christine
Hi,
check this please: Under Options:
Allowed File Types (Download) - Set allowed file types for frontend download. Default list of filetypes is not complete and should be modified to fit your needs.
Kind regards
Christine
Re: Download doc/docx files unreadable
Posted: 14 Dec 2020, 23:07
by lopezan
Hi,
I have alreadt this type of files in the list:
{doc=application/msword}
{docx=application/vnd.openxmlformats-officedocument.wordprocessingml.document}
what can be the problem?
Thx
Re: Download doc/docx files unreadable
Posted: 14 Dec 2020, 23:14
by lopezan
Before upgrade to the last version of Phocadownload, all worked fine.
Regards
Re: Download doc/docx files unreadable
Posted: 14 Dec 2020, 23:26
by christine
Hi,
lopezan wrote: ↑14 Dec 2020, 23:14
Before upgrade to the last version of Phocadownload, all worked fine.
Do you mean new version 3.2.2?
https://www.phoca.cz/download/category/ ... -component
Kind regards
Christine
Re: Download doc/docx files unreadable
Posted: 14 Dec 2020, 23:33
by lopezan
yes, 3.2.2
Re: Download doc/docx files unreadable
Posted: 15 Dec 2020, 17:26
by Jan
Hi, there were no changes regarding download among these versions. Are you sure, nothing changed on server settings (as mostly Phoca Download only gives instructions to server and browser how to handle the files and the communication takes place between browser and server).
What does exactly mean 'unreadable'? Can you provide a link to the files of the file itself: Sometimes it happens that e.g. server renders a php error to the document and such document is then damaged - but when viewing it e.g. in text editor, the error can be read and corrected on server. So maybe, probably this can be the problem (that some new error is rendered to document).
Jan
Re: Download doc/docx files unreadable
Posted: 16 Dec 2020, 22:24
by lopezan
Hi,
i have created two sample pages.
From the first one you can download a docx file using a standard link, and it works fine. The link is:
https://www.fw3.it/index.php?option=com ... Itemid=335
From the second one, you can download the same docx file using Phocadownload component. And it is downloaded corrupted. The link is:
https://www.fw3.it/index.php?option=com ... Itemid=336
Prior to upgrade Phocadownload component, all works fine.
To access to the site, the username/password is:
test/test
The site configuration is:
Joomla! 3.9.23 Stable [ Amani ] 24-November-2020 15:00 GMT
MYSQL 5.7.32
PHP 7.4.10
Phocadownload 3.2.2
Thanks and regards.
Re: Download doc/docx files unreadable
Posted: 19 Dec 2020, 16:44
by lopezan
Hello,
any news?
Regards
Re: Download doc/docx files unreadable
Posted: 19 Dec 2020, 18:37
by Jan
Hi, both files are identical except the first character:
Your server adds empty space before rendering the file ... this can be e.g. displaying of some error message (without text, but leaving empty character, etc. etc.)
Really hard to say - there can be a lot of possible parts which can do it - on server, in Joomla! - e.g. some system plugin, etc. So for test, you can e.g. disable system plugins to be 100% that noone can influence the output, but I think, this will be no the case, as the output is cleaned before downloading:
So the only idea I have is to debug the file:
administrator\components\com_phocadownload\libraries\phocadownload\download\download.php (from part ob_end_clean(); to exit;) and try to check which part adds the empty space there
If this will be not found, then the only way is to use direct download in Phoca Download
Jan