Sfoglia il codice sorgente

get the filename from the properties if no disposition information is
available in the bodystructure.

stekkel 22 anni fa
parent
commit
5b5ff82062
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/download.php

+ 3 - 0
src/download.php

@@ -92,7 +92,10 @@ if (is_object($message->header->disposition)) {
     if (!$filename) {
         $filename = decodeHeader($header->getParameter('name'));
     }    
+} else {
+    $filename = decodeHeader($header->getParameter('name'));
 }
+
 if (strlen($filename) < 1) {
     if ($type1 == 'plain' && $type0 == 'text') {
         $suffix = 'txt';