AFAIK upload fields are just string fields, so you can insert any string there!

db.table.insert(filefield="blah")

should work!

You just have to use Python glob, os, sh or shutil to take a list of files and 
then populate the database.

On Tue, Dec 25, 2012 at 03:40:51PM -0800, lucas wrote:
hello one and all,

i am doing en masse data table using xml data to a table that has an upload
field.  the files are already present in the upload subdirectory but i need
to populate the table with the data, including the file name that is the
upload field.  i hope that made sense.

how do i populate the fields using a db.table_name.insert(*...***) without
web2py wanting to actually upload the file?

thanx in advance, lucas

--




--



Reply via email to