Hi, I had a look at sqlform.py, the error comes from the fact that if a
default value is set for the field upload, web2py tries to read it and
store it as the new value for the upload field. As a result it is not
possible to me to edit forms and remove uploads by setting the default
value, this tri
Hi Massimo, thank for the answer, I updated the code but the problem is
still there, I made several tests, no one figured out what is wrong. So
that I tried to simplify the code as follows:
db.define_table('test_img',
Field("picture", "upload",
uploadfolder=os.path.join(request.fol
perhaps not the cause of the problem but
request.folder+'uploads/pictures'
should be
os.path.join(request.folder,'uploads','pictures')
On Thursday, 27 December 2012 00:30:00 UTC-6, Paolo wrote:
>
> Hi Massimo,
> I've just tried to post and then edit with both SQLFORM.factory having
> uploads
Hi, I thought about the option requires, right now I have:
requires=[IS_IMAGE(), IS_UPLOAD_FILENAME(extension='jpg|jpeg|png'), IS_IMAGE
(extensions=('jpeg', 'png'))
I thought that as defined, the field could not be empty, so, I tried to
remove any constrain
requires=None
but then the delete butt
Hi Massimo,
I've just tried to post and then edit with both SQLFORM.factory having
uploadseparate but nothing has changed. The problem is still there,
actually I am making explicitly inserts and edits.
The whole SQLFORM.factory to edit a field is this:
for field in ['title','descr
Did you upload the file first and then add uploadseparate/uploadfolder?
On Wednesday, 26 December 2012 12:49:01 UTC-6, Paolo wrote:
>
> Hi all,
> it seems to me that SQLFORM.factory doesn't honor the uploadseparate
> option because I'am not able to delete the uploaded file with
> SQLFORM.fact
6 matches
Mail list logo