Discussion:
[Zope3-Users] SVG files
Simon Elbaz
2010-08-09 13:11:31 UTC
Permalink
Hi all,
I would like to know if there is a way to include SVG files into HTML pages.
These files are dynamically generated and their name change.

Thx for your help
Simon
Jonathan (dev101)
2010-08-09 13:26:37 UTC
Permalink
<snip>

From: zope3-users-***@zope.org [mailto:zope3-users-***@zope.org] On
Behalf Of Simon Elbaz
Sent: August-09-10 9:12 AM
To: zope3-users
Subject: [Zope3-Users] SVG files



Hi all,
I would like to know if there is a way to include SVG files into HTML pages.
These files are dynamically generated and their name change.

Thx for your help
Simon

</snip>





We use a lot of dynamically generated image files, and this is how we handle
it:



1- Create a temp_folder (a RAM based folder)

2- Have your code create an image object in the temp_folder

3- Have your code then insert the id (and path) of the newly created
image object into the html you display to the user

4- We have a garbage collector that removes the image objects after a
few minutes (deletion time depends on the volume of images generated, how
big they are and how much ram you want to dedicate to temporary image
storage).



HTH



Jonathan
Simon Elbaz
2010-08-10 21:54:17 UTC
Permalink
Hi,
the zope.browserresource package solved the issue.

Simon
Post by Jonathan (dev101)
<snip>
*On Behalf Of *Simon Elbaz
*Sent:* August-09-10 9:12 AM
*To:* zope3-users
*Subject:* [Zope3-Users] SVG files
Hi all,
I would like to know if there is a way to include SVG files into HTML
pages. These files are dynamically generated and their name change.
Thx for your help
Simon
</snip>
We use a lot of dynamically generated image files, and this is how we
1- Create a temp_folder (a RAM based folder)
2- Have your code create an image object in the temp_folder
3- Have your code then insert the id (and path) of the newly created
image object into the html you display to the user
4- We have a garbage collector that removes the image objects after a
few minutes (deletion time depends on the volume of images generated, how
big they are and how much ram you want to dedicate to temporary image
storage).
HTH
Jonathan
Loading...