Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
There is a way to provide an ability to download files for now, using only
PHP/JS scripting. You can implement a custom SaveFilename dialog in PHP. When
user clicks a download link, a javascript code opens a popup window. In that
popup window you browse through drives/directories to select the path where to
save the file, and enter the name of the file. Clicking OK closes the popup
window and executes some code on the opener window to save the file to the
chosen location. This could be a XMLHttpRequest thing doing it in a background.
Optionally, some progress bar could be displayed.
Original comment by czarek.t...@gmail.com
on 23 Jan 2014 at 7:03
Ability to download files should be configurable through "enable_downloads"
setting.
Original comment by czarek.t...@gmail.com
on 23 Jan 2014 at 7:40
Although it's important to be able to access the Windows Save As dialog to
download files, it personally isn't important to me to have it in the right
click context menu. Having it in the right click menu kind of reveals to the
user they are using a web app, not a desktop app. To me, the point of PHP
Desktop is to be able to present a web app as a desktop app and not have users
know the difference. The fewer reveals that it is a web app the better.
I'd personally like to be able to just turn off the right click menu altogether
in settings.json and create my own right click menu as needed where appropriate
via javascript. Having said that, as long as there's an option to turn it off
and on in the settings file, I'd hate to dash anyone's hopes who is looking
forward to this feature.
Perhaps the best way to do this would be to add a section of the settings file
devoted specifically to what is available in the right click menu. So it could
look like this:
"context_menu": {
"enabled": "true",
"show_print": "true",
"show_back": "true",
"show_forward": "true",
"show_save_as": "false"
}
There could possibly be a few other settings here too I didn't think of. This
is all doable now via javascript, but having the option to do this in settings
might be better.
Original comment by DallinHS...@gmail.com
on 23 Jan 2014 at 8:45
#4 DallinHSmith
It's a good idea to make the context menu configurable. There also appear other
options in context menu when used with forms: Copy/Cut/Paste. I think these
should stay. Dallin, please create a new issue in the tracker for this feature.
Original comment by czarek.t...@gmail.com
on 23 Jan 2014 at 8:52
Done in revision 961dca65478f.
Added new option "enable_downloads" in the settings.json file. Added the
download.php example.
Regarding the "Save as" feature, please create a new issue for that if you need
it.
Original comment by czarek.t...@gmail.com
on 24 Jan 2014 at 4:45
If I change the file name in "Save as" dialog, the downloaded file loses the
extension.
Original comment by marco.ol...@gmail.com
on 10 Mar 2015 at 4:21
Original issue reported on code.google.com by
czarek.t...@gmail.com
on 23 Jan 2014 at 6:55