[Twisted-web] nevow FileUpload
Williamson, Mark
Mark.Williamson at bl.uk
Wed Sep 8 05:01:02 MDT 2004
Hi,
I'm building a web app with nevow/twisted and I'm really
impressed.
I'm having a small problem with Formless though when trying to
upload a file:
here is my interface:
class IAddDocument( formless.TypedInterface ):
"""Interface for Add Document form"""
def addDocument( self , context = annotate.Context() , fdata =
annotate.FileUpload( required = True ) ):
pass
addDocument = formless.autocallable( addDocument )
The form renders fine (I'm using a template pretty much based on the one in
one of the
tutorials except I've messed about with the table layout a bit) and lets me
choose a file
for upload - it also seems to upload the file. However when my method is
called
on my page class:
def addDocument( self , context , fdata ):
...
fdata is None. I've looked at the request from the context and the filename
seems to be there
but not the file data.
Can anyone shed any light on this. Its a bit of a sticking point for me
right now
cheers
mark
**************************************************************************
Experience the British Library online at www.bl.uk
Help the British Library conserve the world's knowledge. Adopt a Book.
www.bl.uk/adoptabook
*************************************************************************
The information contained in this e-mail is confidential and may be legally
privileged. It is intended for the addressee(s) only. If you are not the
intended recipient, please delete this e-mail and notify the
postmaster at bl.uk : The contents of this e-mail must not be disclosed or
copied without the sender's consent.
The statements and opinions expressed in this message are those of the
author and do not necessarily reflect those of the British Library. The
British Library does not take any responsibility for the views of the
author.
*************************************************************************
More information about the Twisted-web
mailing list