Re: request.file inside a function

"Ben Barker" <[email protected]> Tue, 26 Dec 2006 16:27:46 +0000
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
...sorry. Please ignore my previous email. It was a syntax error on my part :-(

Cheers,

Ben

On 26/12/06, Ben Barker <[email protected]> wrote:
> Hi,
>
> Apologies if this is a very basic question! I have just started using
> spyce, and so far it has been great. One issue I have had however is
> that if I try to upload a file from inside a function I have declared
> for example:
>
> [[\
> def upload():
>     upload=request.file(....)
> ]]
>
> Then the file upload fails (upload is blank). If however I put this
> line in the main code, not in a function, it works fine. I thought it
> might be that I needed to pass in the request object to the function
> for it to work, however I can use lines such as request.post(...) with
> no issues at all from both locations.
>
> Any suggestions? I hope the above makes some sense!
>
> Cheers,
>
> Ben
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV