Explorar o código

[Uploadable] Minor fixes.

comfortablynumb %!s(int64=13) %!d(string=hai) anos
pai
achega
21fadfda85
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      lib/Gedmo/Uploadable/UploadableListener.php

+ 4 - 0
lib/Gedmo/Uploadable/UploadableListener.php

@@ -289,6 +289,10 @@ class UploadableListener extends MappedEventSubscriber
         }
 
         $info = $this->moveFile($fileInfo, $path, $generatorClass, $config['allowOverwrite'], $config['appendNumber']);
+
+        // We override the mime type with the guessed one
+        $info['fileMimeType'] = $mime;
+
         $filePathField->setValue($object, $info['filePath']);
 
         if ($config['callback'] !== '') {