new in trunk delete_uplaods

0 views
Skip to first unread message

mdipierro

unread,
Dec 27, 2008, 6:36:52 AM12/27/08
to web2py Web Framework
new in trunk:

form=SQLFORM(....)
if form.accepts(...,delete_uploads=True): ...

if set to True files previously uploaded in this record will be
deleted when the record is deleted or when the file is replaced.

Mind that if you do

db(query).delete()

referenced files are not automatically deleted. They never where. Now,
also you trunk, you can do

db(query).delete(delete_uploads=True)

Should this be the default behavior?

It would break backward compatibility but it is already the default
when files are uploaded in the db itself (i.e. on GAE).

Massimo
Reply all
Reply to author
Forward
0 new messages