add more robust download functionality; convert to new API in Stexaminer::graphsvg
[scpubgit/stemmaweb.git] / lib / stemmaweb / View / GraphML.pm
CommitLineData
38627d20 1package stemmaweb::View::GraphML;
2
3use strict;
4use base 'Catalyst::View';
5
6sub process {
7 my( $self, $c ) = @_;
8 $c->res->content_type( 'application/graphml+xml' );
9 $c->res->content_encoding( 'UTF-8' );
6cf17f04 10 if( $c->stash->{download} ) {
11 $c->res->header( 'Content-Disposition',
12 sprintf( "attachment; filename=\"%s.xml\"", $c->stash->{name} ) );
13 }
38627d20 14 $c->res->output( $c->stash->{result} );
15}
16
171;