autodelete(?) on computed field

16 views
Skip to first unread message

Marin Pranjić

unread,
Apr 14, 2014, 5:49:50 AM4/14/14
to web...@googlegroups.com
db.define_table(...,
 
Field('image', 'upload', autodelete=True),
 
Field('thumbnail', 'upload', autodelete=True, compute=create_thumbnail),
 
...)

This is not working because on _before_update/_before_delete callbacks thumbnail is not one of the upload_fields.
I am talking about delete_uploaded_files defined inside gluon/dal.py.

Is there an easier way or I have to manually do the code?

Marin

Marin Pranjić

unread,
Apr 15, 2014, 11:21:32 AM4/15/14
to web2py-users
Ok, I'll just code it by myself. I was hoping there is better solution.

Marin


--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages