Re: [Zope] Weird paths in the filesystem using Photo and ExtFile

2006-08-27 Thread Pablo Ziliani

Thanks a lot, Stefan, for your kind response, I didn't see that.
Although it's not clear to me who is responsible for this, I suppose 
that because of this feature, storing Photos in the filesystem should 
be discouraged in multiple virtual host environments and that a big 
warning message added at least to this product's readme file.


Regards,
Pablo

Stefan H. Holek wrote:

Hi Pablo,

This comment from the ExtFile source code may shed some light on the 
issue. Photos can for historical reasons, and without changes to the 
Photo product, not take advantage of ZODB_PATH = PHYSICAL.


# XXX: The Photo product uploads into unwrapped ExtImages.
# As we can not reliably guess our parent object we fall back
# to the old behavior. This means that Photos will always
# use ZODB_PATH = VIRTUAL independent of config settings.

Stefan


On 25. Aug 2006, at 21:54, Pablo Ziliani wrote:


For example, if I call these real urls:
- 
http://zopeserver.com:8080/sites/site1/images/image.jpg?display=whatever
- 
http://zopeserver.com:8080/sites/site2/images/image.jpg?display=whatever


in the filesystem I would have something like:
- 
$INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg 

- 
$INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg 



but if I call the same via the virtual url:
- http://www.virtualsite1.com/images/image.jpg?display=whatever
- http://www.virtualsite2.com/images/image.jpg?display=whatever

I only get:
$INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams







___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Weird paths in the filesystem using Photo and ExtFile

2006-08-26 Thread Stefan H. Holek

Hi Pablo,

This comment from the ExtFile source code may shed some light on the  
issue. Photos can for historical reasons, and without changes to the  
Photo product, not take advantage of ZODB_PATH = PHYSICAL.


# XXX: The Photo product uploads into unwrapped ExtImages.
# As we can not reliably guess our parent object we fall back
# to the old behavior. This means that Photos will always
# use ZODB_PATH = VIRTUAL independent of config settings.

Stefan


On 25. Aug 2006, at 21:54, Pablo Ziliani wrote:


For example, if I call these real urls:
- http://zopeserver.com:8080/sites/site1/images/image.jpg? 
display=whatever
- http://zopeserver.com:8080/sites/site2/images/image.jpg? 
display=whatever


in the filesystem I would have something like:
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/ 
image_whatever.jpg
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/ 
image_whatever.jpg


but if I call the same via the virtual url:
- http://www.virtualsite1.com/images/image.jpg?display=whatever
- http://www.virtualsite2.com/images/image.jpg?display=whatever

I only get:
$INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg


--
Anything that, in happening, causes something else to happen,
causes something else to happen.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Weird paths in the filesystem using Photo and ExtFile

2006-08-25 Thread Pablo Ziliani

Hi all,
I am experimenting some problems with Photo/Photo Folder (or ExtFile) 
products in a fresh Zope instance.
I have two different sites that share a very similar structure. Their 
virtual roots are sibling folders in the ZODB.
Both have a Photo Folder called images, that are storing in the 
filesystem via ExtFile. The problem is that when a photo with a non-yet 
generated display is being called through the virtual url, the 
corresponding image is created in the filesystem as if the topmost 
folder was the virtual root of the site (namely 
$INSTANCE_HOME/var/photos/). If I call this photo through the real 
(non virtual) url, this topmost folder matches the ZODB root.


For example, if I call these real urls:
- http://zopeserver.com:8080/sites/site1/images/image.jpg?display=whatever
- http://zopeserver.com:8080/sites/site2/images/image.jpg?display=whatever

in the filesystem I would have something like:
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg
- $INSTANCE_HOME/var/photos/sites/site1/images/image.jpg/image_whatever.jpg

but if I call the same via the virtual url:
- http://www.virtualsite1.com/images/image.jpg?display=whatever
- http://www.virtualsite2.com/images/image.jpg?display=whatever

I only get:
$INSTANCE_HOME/var/photos/images/image.jpg/image_whatever.jpg

both paths point to the same file! I think you understand why this 
worries me.

Any hint would be greatly appreciated.

Thanks,
Pablo

Relevant software installed:
   Linux Fedora Core 3
   Zope: 2.9.4
   Python: 2.4.3
   ExtFile: 1.5.0-beta1
   Photo: 1.3.1


PS: and BTW, the Zipupload feature in Photo Folder fails miserably for 
some reason.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )