List Info

Thread: Large file uploads with CP




Large file uploads with CP
country flaguser name
United States
2007-06-27 15:49:25
I read, from the following link, that cherrypy is putting
file upload
data into a temporary file for me. Then, later, when my
controller is
invoked, it can read from the file and store it in a
permanent file.

http://www.cherrypy.org/browser/trunk/cher
rypy/tutorial/tut09_files.py

If true, then is there a way to move the file rather than
read it
again in
my TG controller?

Seems like this would be potentially more efficient,
especially with
large files, as I am expecting quite often with my video
application.

Can someone please confirm that this temporary file scheme
is indeed
used.
I currently am using CP 2.2.1 with TurboGears.

thanks,
Jesse.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Large file uploads with CP
country flaguser name
United States
2007-06-27 23:05:00
ok, I have been digging in the CP code trying to determine
whether an
actual disk file is used to temporarily store a file upload
(multipart
mime type).
I am using PyDev debugger to remotely debug the upload
handling code
have been able to traverse most of the stack backwards from
read_lines_to_outerboundary to processBody.

However, I cannot find where an actual file is ever
created.
anyone know where this code is?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Large file uploads with CP
country flaguser name
United States
2007-06-27 23:19:54
ok. looked at make_file, then found where it is called from
read_lines_to_outerboundary.
it struck me that this code looks like it was written
without use of a
state machine.
If memory serves, in my humble beginnings as a firmware
developer in
the early 80's, I used state machines to crunch complexity
in handling
obscenely complicated protocols in low level interrupt-based
handling
logic.

just a thought.

anyway, I see where the call to __write takes place after
the line is
read and 'processed' .
Looks like this may tend to answer my original question.
thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )