<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Martijn,<br>
<br>
Sorry for that long silence, its just a side project I'm working on and
I don't have more than one day per week...<br>
<br>
Anyway, I don't want to store the files that get uploaded in the ZODB
not at all! That's why I thought Tramline would be cool, cause I think
that's the idea of Tramline (when I got it right).<br>
<br>
One reason for this is, that I need direct access to the files on the
filesystem.<br>
<br>
<br>
thanks.<br>
<br>
<blockquote cite="mid:higg17$cr2$1@ger.gmane.org" type="cite">
<pre wrap="">Hey,
Hannes wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I've another concern. I played a little bit with Tramline and HurryFile.
How do I get a upload widget? How do I handle the remote file transfer
from the client to the server?
Is this all done automatically? The HurryFile sample code from PyPi has
some gaps... :-(
</pre>
</blockquote>
<pre wrap=""><!---->
I agree that the example has gaps - it isn't a great example as it was
primarily written for testing purposes..
For normal file uploads you could use hurry.file, setting the widget as
a custom_widget to your form (find a form tutorial), but you could even
just resort to a 'schema.File' field and everything should work.
hurry.file just makes a few things a bit more convenient (like retaining
the uploaded file when the form failed to validate instead of forcing a
reupload).
The difficulty is with storing large files in the ZODB. Tramline is one
way around this (you can find tramline's INSTALL.txt here):
<a class="moz-txt-link-freetext" href="http://codespeak.net/svn/rr/tramline/trunk/">http://codespeak.net/svn/rr/tramline/trunk/</a>
This makes use of Apache's upload and download facility but can be
somewhat involved to set up.
Alternatively these days the ZODB is quite capable of storing large
files as a "blob". Tramline can be avoided that way (even though the
performance of tramline would probably be a bit higher for many uploads
or downloads).
z3c.blobfile can be used to help storing large files in a convenient way.
<a class="moz-txt-link-freetext" href="http://pypi.python.org/pypi/z3c.blobfile">http://pypi.python.org/pypi/z3c.blobfile</a>
An example of this can be found here (in an older grok application, and
no UI bits are included as this is a web service):
<a class="moz-txt-link-freetext" href="http://code.google.com/p/imagestore/source/browse/trunk/src/imagestore/image.py">http://code.google.com/p/imagestore/source/browse/trunk/src/imagestore/image.py</a>
(and imagecontainer.py. actually the use is only very minimal so perhaps
not that instructive)
Once you get something figured out we'd be very happy to see a tutorial
or howto appear on grok.zope.org by the way. :)
Regards,
Martijn
_______________________________________________
Grok-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Grok-dev@zope.org">Grok-dev@zope.org</a>
<a class="moz-txt-link-freetext" href="https://mail.zope.org/mailman/listinfo/grok-dev">https://mail.zope.org/mailman/listinfo/grok-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>