[web2py] Re: Upload file default

2011-02-24 Thread villas
Not sure if relevant, but note this issue is still open: http://code.google.com/p/web2py/issues/detail?id=188 Maybe make a comment there? On Feb 24, 8:35 am, firedragon852 wrote: > I find that if I use default = 'xxx.jpg' and the form input is left > empty, the field will have a length of 0 (not

[web2py] Re: Upload file default

2011-02-24 Thread firedragon852
I find that if I use default = 'xxx.jpg' and the form input is left empty, the field will have a length of 0 (not null) instead of the defined default value. Is this a bug? On Feb 8, 4:51 pm, Bernardo Botella Corbí wrote: > Hi Massimo, > > I'm trying it, but maybe I am doing something wrong. > >

Re: [web2py] Re: Upload file default

2011-02-08 Thread Bernardo Botella Corbí
Hi Massimo, I'm trying it, but maybe I am doing something wrong. in the model I have this: Field('imagen', 'upload', default='auth_user.imagen.a9ea07ced8e92070.56657370615f4c58565f323030375f31315f31303234783736382e6a7067.jpg'), being that jpg file an upload file inside the upload folder. If I le

[web2py] Re: Upload file default

2011-02-07 Thread Massimo Di Pierro
If you have an uploaded file (with name given by web2py) you can set default='' its filename without path. Did you try it? On Feb 7, 1:40 pm, Bernardo wrote: > Dear all, > > is there a way to use a default file in an upload field? Something > like: > > Field('whatever', 'upload', 'default=...