Auftrags-Controller: mime-type füer odt
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Sat, 10 Aug 2019 15:53:46 +0000 (17:53 +0200)
committerWerner Hahn <wh@futureworldsearch.net>
Sun, 11 Aug 2019 12:09:54 +0000 (14:09 +0200)
SL/Controller/Order.pm

index abe6b0e..7a7841d 100644 (file)
@@ -10,6 +10,7 @@ use SL::SessionFile::Random;
 use SL::PriceSource;
 use SL::Webdav;
 use SL::File;
+use SL::MIME;
 use SL::Util qw(trim);
 use SL::YAML;
 use SL::DB::Order;
@@ -360,7 +361,7 @@ sub action_download_pdf {
   my $tmp_filename = $::auth->get_session_value("Order::print-${key}");
   return $self->send_file(
     $tmp_filename,
-    type => 'application/pdf',
+    type => SL::MIME->mime_type_from_ext($::form->{pdf_filename}),
     name => $::form->{pdf_filename},
   );
 }