For input you could save the files temporary as upload files,
or without saving them you can use HTML5 javascript FileReader and save the file content to hidden <input>s.
No idea if web2py will upload something based on file handlers from SQLFORM.factory with upload fields.
If so, you will upload it twice (from hidden fields and as standard upload), and so you could re-create both file <input>s before the submit via javascript DOM manipulation (because it is not possible set the value of upload field from javascript, nor clear it: the 1-st is clever, but the 2nd stupid :( )
For output you could
- return the resulting file content as string from the controller (I hope web2py makes nothing with string output),
- and change http headers for download (Content-Disposition or so) to force Save dialog.
Maybe somebody has much much better answer, but previous is not too difficult, few lines of code for FileReader. FileReader is supported in modern browsers but not IE8. (IE9?)
Dne pondělí 2. května 2016 4:34:40 UTC+2 teld dlet napsal(a):