You're right, uploadeseparate is True or False, but this has no impact
on what I'm having trouble with.
I tried this:
db.book[book_id.update(filename=db.book.filename.store(request.vars.filename))
This causes the no_table.filename/8a/no_table.name.8ae28bb9335....txt
to attempt to be copied to
book.filename/80/book.filename.8079f35...txt, however the contents of
the file are not copied.
For good measure, I'm getting ticketed:
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 178, in restricted
exec ccode in environment
File "C:/web2py/applications/myapp/controllers/book.py", line 261,
in <module>
File "C:\web2py\gluon\globals.py", line 96, in <lambda>
self._caller = lambda f: f()
File "C:/web2py/applications/myapp/controllers/book.py", line 91, in
index
name=db.book.filename.store(request.vars.filename)
File "C:\web2py\gluon\sql.py", line 2714, in store
shutil.copyfileobj(file, dest_file)
File "C:\Program Files\Python25\Lib\shutil.py", line 26, in
copyfileobj
buf = fsrc.read(length)
File "C:\Program Files\Python25\Lib\cgi.py", line 548, in
__getattr__
raise AttributeError, name
AttributeError: read
So, either I've totally screwed up or there's a deeper problem.