Commit a208fd72 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

UploadedFileInterface : changement nom de méthode getType() en getTypeMime().

parent 36eb9978
Loading
Loading
Loading
Loading
+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
@@ -52,7 +52,7 @@ interface UploadedFileInterface
     *
     * @return string
     */
    public function getType();
    public function getTypeMime();

    /**
     * Retourne la date de dépôt du fichier.
+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
@@ -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);