[web2py] Re: file uploads from legacy database

2010-04-15 Thread selecta
thanks Rowdy I was looking for exactly this kind of advice :) import glob for filename in glob.glob('/path/to/files/*'): db.yourtable.insert(yourfield=db.yourtable.yourfield.store(open(filename,'rb'))) writing my own download function would work but it would break future uploads which should be

[web2py] Re: file uploads from legacy database

2010-04-14 Thread Rowdy
selecta wrote: I am currently migrating a legacy db (mysql) to web2py. I have written some tooling that I will share as soon as I'm done (e.g. some code to convert phpmyadmin exports of sql table creates to web2py code) Right now I am dealing with the file uploads from the legacy db. What I have