[web2py] Re: Upload field custom manipulation

2014-08-05 Thread Kuba Kozłowicz
What does "writable=false if forms" mean and WHAT should I apply this to? And where should I plug this "URL('mydownload', ... ) into? Sorry, but I understand if you just write some web2py-specific code completely out of contex. It requires some explanation. W dniu niedziela, 3 sierpnia 2014 00:

[web2py] Re: Upload field custom manipulation

2014-08-05 Thread Kuba Kozłowicz
Ok so I've already figured out what you meant. I should set 'writable' attribute of this field in db_wizard.py to False in order to prevent this field from being overwritten in forms. Then change type from 'string' to 'upload' and apply URL('mydownload') to 'represent' attribute of this field

[web2py] Re: Upload field custom manipulation

2014-08-02 Thread Massimo Di Pierro
Than it is easy. make it writable=false if forms. Store your filename in the the upload field. But instead of URL('download',) use URL('mydownload',) Where: def mydownload(): fullname = os.path.join(os.path.join, 'private', request.args(0)) response.stream(fullname) On Wed

[web2py] Re: Upload field custom manipulation

2014-07-31 Thread Kuba Kozłowicz
f_invoice_file_path is location where the file is stored by myself, because I generate these files myself and I save them myself as well. It contains whole path to the file ( with the filename and its extension ). They are stored under "private" directory with the structure I described above. I

[web2py] Re: Upload field custom manipulation

2014-07-29 Thread Massimo Di Pierro
Let me understand this better f_invoice_file_path is the location where the file is supposed to be stored or is it the full path including the desired filename? Do you handle the file writing or should web2py do it automatically? On Tuesday, 29 July 2014 05:59:10 UTC-5, Kuba Kozłowicz wrote: >