So far really happy with this plugin, however I've noticed that when the file is downloaded, the file extension appears to be dropped off.... so unless the end user saves the file with a file extension - the file can't be opened after downloading by some users.
I've also run into an issue adding a thumbnail - which threw exceptions on "Private Files" menu page... I was unable unable to remove the plugin for a while due to error "Undefined variable: table" on line 14 of /var/www/vhosts/"domain.com"/httpdocs/plugins/kurtjensen/privatefiles/updates/change_permission_nulable.php
I've rectified issues except for the file extension is not there when a user goes to save file - which is really important for the users. Can it be amended so it's appended to the filename on save?
I have found and fixed the issue in "privatefiles/updates/change_permission_nulable.php".
Sorry about that error on my part and thank you for reporting.
The file extension is set when you upload the file. On the front end, the file name and extension are the same as what you uploaded unless you specify it in the Public File Name text field. That is where you would want the file extension added to any text in there.
Not sure about the thumbnail issue that you mentioned but it sounds like you figured that out anyway.
Here is what I found:
In Chrome ( on Linux ), PDF files open when clicked due to an extension in Chrome and when I click button to save, the file name was not preserved but instead tried to save as "document.pdf".
In Firefox ( on Linux ) the PDF file opens but saves as the proper file name and extension.
If I right click and "Save Link as" instead of simple click in either browser, the file name is correct to the Public File Name that I set for the download.
So it is possible that browsers are also dropping the file extension which may mean that I need to update the file headers to prevent this on download. Currently I am defaulting to the headers provided by October CMS for the Database Attached Files.
Hi Kurt, I'm struggling with this issue to.
The plugin is beautiful but the files are saved without extension.
I use your plugin for a community and a workaround is to tell the users:
"each file you download you have to add the file extension when saving".
but that is not professional.
I found this example below, but it is not dynamic.
Do you have a correct code fix that I can use on the page code tab that supports pdf and doc/docx files? or perhaps add dl.privatefile.extension tot the download link?
We are proud to announce that the stable release of the October CMS 2 is now available! The release represents over a year of design, research and development effort, which resulted in multiple new features and changes.