Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango: get path of local file from file chooser dialog without uploading?
    text
    copied!<p>My django app is local. I'd like it to store "attachments" as full local file-system paths rather than uploading the actual files themselves. I don't want my user to have to find and copy these paths by hand, they are "untechnical" and that would be inelegant. Instead I'd like them to be able to just hit a browse button to pop up a file chooser dialog and just point it to the file on their local file-system. How might I go about this?</p> <p>Deployment platform is Windows but development platform is linux (gnome 3) so I ideally I'd like a cross platform solution, even if that means separate blocks of code to handle each.</p> <p>OK, this subject seems to be responsible for enormous wailing and gnashing of teeth amongst intranet developers, none of whom seem to have agood solution. Having mulled it over for a couple of days there seems to be two plausible strategies...</p> <p>1) Write a java applet that... displays as a browse button opens a file chooser dialog when clicked upon ok being clicked sticks the full path into the appropriate place in the dom</p> <p>2) As this app is single user and the server runs on the same machine... the server receives an ajax request IT opens a file open dialog and return the result to the browser via ajax</p> <p>As a java novice I am hesitant to try and implement 1 although it seems the more elegant solution. I might try if I could find some existing code that did this or something similar though... anyone know of any? Failing that, for my particular need, 2 is going to be much faster to implement, if ugly as sin :/</p> <p>Thanks,</p> <p>Roger</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload