7 msgConfiguration of $c->log with Catalyst::Log:...
8 msgInvalid session ids being generated
4 msgCatalyst / dbix-class / mysql / REST job
2 msgStrange UTF16 warning
1 msgWikipedia article improvement?
5 msgFastCGI: incomplete headers (0 bytes) received ...
5 msgBasic CRUD Tutorial
2 msgHow to display a single HTML::Widget form field...
7 msgLet's port Twitter to Perl
8 msgCatalyst, utf8 in form element type text
17 msgAnybody who fancies some LWP poking ...
55 msgRFC: Catalyst::Controller::REST::DBIC
1 msgKill the book thread please
2 msgMore Catalyst Template Toolkit examples?
6 msgFw: high school reunion (no subject)
2 msg(no subject)
6 msgUsing URIs for my app in another program
4 msgTutorial
11 msg$row->copy causing exit from controller(!)

How to print/display some data in an end action
\ Emmanuel Quevillon (30 Apr 2008)
. \ Andreas Marienborg (30 Apr 2008)
. . \ Emmanuel Quevillon (30 Apr 2008)
. . . \ Aristotle Pagaltzis (30 Apr 2008)
. . . . \ Emmanuel Quevillon (30 Apr 2008)
. . . . . \ Aristotle Pagaltzis (30 Apr 2008)
. . . . . . \ Emmanuel Quevillon (5 May 2008)
. . . . . . . \ Kieren Diment (5 May 2008)
. . . . . \ Andreas Marienborg (1 May 2008)
. . . . . . \ Aristotle Pagaltzis (1 May 2008)
. . . . . . . \ Emmanuel Quevillon (5 May 2008)
. . . . . \ Matt S Trout (5 May 2008)
. \ Mitch Jackson (30 Apr 2008)
. \ Emmanuel Quevillon (5 May 2008)

Subject:Re: How to print/display some data in an end action
Group:Catalyst
From:Emmanuel Quevillon
Date:5 May 2008


 
Mitch Jackson wrote:
> Emmanuel,
>
> Your object is going to request the svg file from your display method,
> just like a web browser would. When catalyst delivers the file, it
> needs to look like an SVG to the browser. Some browsers look for
> different things.
> http://www.getsvg.com/implementation_issues/content_type_image_svg_xml
> Looks like you need to end the URL with ".svg", and also set the
> content type. You may need to add a "dummy" parameter at the end of
> your url, that you throw away and ignore, so the url looks like a
> .svg. for example... http://..../display/1/something.svg. Setting
> the filename, as I recommended, may or may not replace the need for
> this... however, it will make it so if you hit the URL in the web
> browser that it behaves properly.
>
> You also need to set the content type to image/svg+xml
>
> sub end : Private {
> my($self, $c) = @_;
> my $g = $c->req->args()->[0];
> $c->res->content_type( "image/svg+xml" );
> $c->res->body( $g );
> }
>
> Good luck,
>
> /Mitch
>
Hi Mitch,

You were right! Thanks a lot.
Adding the '.svg' in the end of my url :
http://.../rg/1.svg

displays correctly the image inside the template!
So I'd like to thank all people who have tried to help me
with this problem, thinking it is a Catalyst problem. It
looks like it is more a browser issue.

Cheers

Emmanuel
--
-------------------------
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-------------------------

_______________________________________________
List: Catalyst
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst/
Dev site: http://dev.catalyst.perl.org/


© 2004-2008 readlist.com