Thanks a lot!

My problem is that you can not store (pickle) file objects in the session variable.

I could create non-temporary files and store their absolute path.
And remove files after the session expires. Still do not feel that this is the best (most elegant) solution. :-)

----
I will check out the tw.uploadify that may work in a way that I simply do not have to preserve files between browser requests.

Tamas

Diez B. Roggisch wrote:
On Jun 3, 2011, at 2:27 PM, Tamas Hegedus wrote:

Hi,

I am developing a TG 2 web application, in which the user can upload several 
files (text files, not huge, but large). Then I run a task with each file 
(command file1, command file2, etc.).

My question: what do you suggest for storing the files while the job is 
submitted by the user?

I could store all the files in the session variable and then write each file 
into a temporary file... But this does not seems an optimal, elegant solution 
for me (I am not a programmer).

It depends on your task. If that what you describe above are really 
commandline-tools being invoked, then you should simply create a temp-file. No 
need to store anything in memory, that just blows up the python memory 
footprint without any gain - so forget about session storage.

Diez


--
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to