I already searched thought this groups for uploads and found a bunch
similar questions, but not exactly my case -- I apologize if this has been
answered before.
I have a minimal RESTful web service defined as follows:
db.define_table('UPLOAD',
Field('custom_name' ,type='string', length=40, required=True),
Field('file_name', type='upload', required=True),
)
@request.restful()
def index():
def GET(upload_id=None):
if not upload_id:
form = SQLFORM(db. UPLOAD )
response.view = 'default/index.html'
return dict(form=form)
else:
...
def POST(*args,**vars):
return db.UPLOAD.validate_and_insert(**vars)
return locals()
when it posts, it does insert the file and and custom name, but it does not
actually save the file to disk (or anywhere for that matter). Am I missing
a step somewhere? Thanks.