Make File assets work with the exporter. This means not using the streaming
mechanism. This isn't optimal; should find a way to use the streaming mechanism iff we know that there's going to be a live HTTP session on the other end and not just a filehandle.
This commit is contained in:
parent
dc5d96dd5b
commit
d0bacc8988
2 changed files with 29 additions and 17 deletions
|
|
@ -301,21 +301,20 @@ sub www_resize {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view
|
||||
|
||||
A web executable method that redirects the user to the specified page, or displays the edit interface when admin mode is enabled.
|
||||
|
||||
=cut
|
||||
|
||||
# Use superclass method for now.
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
my $storage = $self->getStorageLocation;
|
||||
$self->session->http->setRedirect($storage->getUrl($self->get("filename")));
|
||||
$self->session->http->setStreamedFile($storage->getPath($self->get("filename")));
|
||||
return "1";
|
||||
$self->SUPER::www_view;
|
||||
}
|
||||
|
||||
#sub www_view {
|
||||
# my $self = shift;
|
||||
# my $storage = $self->getStorageLocation;
|
||||
# $self->session->http->setRedirect($storage->getUrl($self->get("filename")));
|
||||
# $self->session->http->setStreamedFile($storage->getPath($self->get("filename")));
|
||||
# return "1";
|
||||
#}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue