Makes sense. I updated the book to reflect this: http://web2py.com/books/default/chapter/29/6#Manual-uploads.
Anthony On Monday, July 9, 2012 10:26:52 PM UTC-4, Massimo Di Pierro wrote: > > The problem is this: > > db.table.insert(field = db.table.field.store(...)) > > db.field.store is executed before db.table.insert therefore before the > record is created. > > there are three options: > 1) db.table.field.uploadfield==True (the default) no problem. store() > uploads to filesystem because it filesystem exists before insert() > 2) db.table.field.uploadfield=='blobfield' store() cannot upload because > insert was not executed therefore there is no pace to read it into. > 3) db.table.field.uploadfield==db.othertable.field in this case store() > will upload into the other table (a table used only to store uploaded > files) a new record is created in the othertable before the current insert() > > One could do more automation in 2 but there would be a lot of magic under > the hood that would result in non-intuitive behavior. Moreover it would > make more difficult manipulation of the file content on upload. > > On Monday, 9 July 2012 19:39:34 UTC-5, Anthony wrote: >> >> On Monday, July 9, 2012 7:59:50 PM UTC-4, Derek wrote: >>> >>> That is correct, that's how it's documented as well. >>> >> >> Is it documented that the file storage is not handled when the file is >> stored in a blob field rather than the filesystem? >> >> Anthony >> >

