Image __browser_default__

classic Classic list List threaded Threaded
3 messages Options
Alan Milligan Alan Milligan
Reply | Threaded
Open this post in threaded view
|

Image __browser_default__

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have some instances where I dynamically create images, ie <img
src="bla" .../> where bla is a method returning an Image.

This technique works perfectly in the ZMI, but not under Plone.  I was
following the discussions a few months ago indicating that Tiran's
CMFDynamicFTI stuff in 2.1 was going to miraculously fix this issue.  It
hasn't.

Should I be returning an ATImage or something more exotic to make this
stuff work under Plone?

Alan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDV6GcCfroLk4EZpkRAraqAJ48DRLocEJ9oFF9ERyaQDAPKQieHwCfXGCS
igddIbPBrtlvGKN7630j2Dw=
=A3XW
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Laurence Rowe Laurence Rowe
Reply | Threaded
Open this post in threaded view
|

Re: Image __browser_default__

Hi,

This should probably be on plone users, but if you are dynamically
creating an image then you do not need to return an image object, only
write the image data out with RESONSE.write(data). Make sure you do a
RESONSE.setHeader to the correct content type (and possibly length to if
you know it).

perhaps the problem is that the base tag is set to the folder instead of
the object itself (assuming your object is not folderish) in which case
your image would have to be <img src="here/bla" tal:attributes="src
string:${here/absolute_url}/bla" />

Laurence

Alan Milligan wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have some instances where I dynamically create images, ie <img
> src="bla" .../> where bla is a method returning an Image.
>
> This technique works perfectly in the ZMI, but not under Plone.  I was
> following the discussions a few months ago indicating that Tiran's
> CMFDynamicFTI stuff in 2.1 was going to miraculously fix this issue.  It
> hasn't.
>
> Should I be returning an ATImage or something more exotic to make this
> stuff work under Plone?
>
> Alan
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFDV6GcCfroLk4EZpkRAraqAJ48DRLocEJ9oFF9ERyaQDAPKQieHwCfXGCS
> igddIbPBrtlvGKN7630j2Dw=
> =A3XW
> -----END PGP SIGNATURE-----
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Alan Milligan Alan Milligan
Reply | Threaded
Open this post in threaded view
|

Re: Image __browser_default__

In reply to this post by Alan Milligan
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lawrence,

Yes, I just independently discovered this, spotting a 404 error in the
Z2 log.  It seems that the image sought is actually in the parent folder
of the object wrapping the image in question - it's indeed very lost
(base/here seem to be entirely ignored!)

Thanks for your help.

Alan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDWdYeCfroLk4EZpkRAtcbAJ97SdCTLVpsyPISCAtkL/C4JLGHmwCfexo/
asgo/pdXBWlmv7HAZJFR7aY=
=Y5UV
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers