hello I'm trying an acquisition, but I must be doing something wrong... I've got a setting like this : /dir1/dir2_1/dir3_1 /dir1/dir2_2/dir3_2 /dir1/dir2_2/img.jpg /img.jpg I write somthing like : context['img.jpg'].absolute_url() I expect to get /dir1/img.jpg, in all cases but when the script runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2 unfortunately, that's not what happends... may someone help me ? thanks
On 9/16/05, chetzacoalt <chetzacoalt@free.fr> wrote:
hello
I'm trying an acquisition, but I must be doing something wrong...
I've got a setting like this :
/dir1/dir2_1/dir3_1 /dir1/dir2_2/dir3_2 /dir1/dir2_2/img.jpg /img.jpg
I write somthing like : context['img.jpg'].absolute_url()
I expect to get /dir1/img.jpg, in all cases but when the script runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2
unfortunately, that's not what happends...
No, the absolute_url() will reflect how you are getting the image. context['img.jpg'].aq_inner.absolute_url() may do what you expect.
may someone help me ?
Sure. What's the problem? :) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
hello
I'm trying an acquisition, but I must be doing something wrong...
I've got a setting like this :
/dir1/dir2_1/dir3_1 /dir1/dir2_2/dir3_2 /dir1/dir2_2/img.jpg /img.jpg
I write somthing like : context['img.jpg'].absolute_url()
I expect to get /dir1/img.jpg, in all cases
Why do you expect that? There is no img.jpg in dir1. Also, absolute_url() includes protocol, server, port, and virtual hosting configuration if you are using one. So, if there is no virtual hosting in effect, you should expect http://your_server:your_port/img.jpg
but when the script runs from /dir1/dir2_2/ and /dir1/dir2_2/dir3_2
In that case you should expect to get http://your_server:your_port/dir1/dir2_2/img.jpg (with modifications for virtual hosting if applicable).
unfortunately, that's not what happends...
what DOES happen? Always a good idea to include that information with problem reports :-) -PW
participants (3)
-
chetzacoalt -
Lennart Regebro -
Paul Winkler