Loading src/UnicaenApp/Controller/Plugin/Upload/UploadedFileInterface.php +1 −1 Changes for src/UnicaenApp/Controller/Plugin/Upload/UploadedFileInterface.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ interface UploadedFileInterface * * @return string */ public function getType(); public function getTypeMime(); /** * Retourne la date de dépôt du fichier. Loading src/UnicaenApp/Controller/Plugin/Upload/UploaderPlugin.php +1 −1 Changes for src/UnicaenApp/Controller/Plugin/Upload/UploaderPlugin.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ class UploaderPlugin extends AbstractPlugin implements ServiceLocatorAwareInterf { $contenu = $fichier->getContenu(); $content = is_resource($contenu) ? stream_get_contents($contenu) : $contenu; $contentType = $fichier->getType() ?: 'application/octet-stream'; $contentType = $fichier->getTypeMime() ?: 'application/octet-stream'; header('Content-Description: File Transfer'); header('Content-Type: ' . $contentType); Loading Loading
src/UnicaenApp/Controller/Plugin/Upload/UploadedFileInterface.php +1 −1 Changes for src/UnicaenApp/Controller/Plugin/Upload/UploadedFileInterface.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ interface UploadedFileInterface * * @return string */ public function getType(); public function getTypeMime(); /** * Retourne la date de dépôt du fichier. Loading
src/UnicaenApp/Controller/Plugin/Upload/UploaderPlugin.php +1 −1 Changes for src/UnicaenApp/Controller/Plugin/Upload/UploaderPlugin.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ class UploaderPlugin extends AbstractPlugin implements ServiceLocatorAwareInterf { $contenu = $fichier->getContenu(); $content = is_resource($contenu) ? stream_get_contents($contenu) : $contenu; $contentType = $fichier->getType() ?: 'application/octet-stream'; $contentType = $fichier->getTypeMime() ?: 'application/octet-stream'; header('Content-Description: File Transfer'); header('Content-Type: ' . $contentType); Loading