Audrius Kažukauskas wrote: > You can do this somewhere in the beginning of paste.request module: > > class MyFieldStorage(cgi.FieldStorage): > def make_file(): ... # Your code here > > cgi.FieldStorage = MyFieldStorage > > It's a bit hacky, but it works (I tested it myself). > > BTW, maybe Paste author (it's Ian Bicking, right? :-) could come with > more convenient way (public API calls?) to control this without the need > of code modification in paste.request?
That's possible, but looking at the source of tempfile it uses the environmental variables $TMPDIR, $TEMP, and $TMP to figure out where to put temporary files, and setting those values should be easy in comparison to these other techniques. Patching cgi.FieldStorage would allow for more fine-grained control (just where uploads go, instead of all temp files), but I'm not sure how important that really is. -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
