src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location
|
@@ 389-398 (lines=10) @@
|
386 |
|
* |
387 |
|
* @return string |
388 |
|
*/ |
389 |
|
private function guessContentType($content) |
390 |
|
{ |
391 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
392 |
|
|
393 |
|
if (is_resource($content)) { |
394 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
395 |
|
} |
396 |
|
|
397 |
|
return $fileInfo->buffer($content); |
398 |
|
} |
399 |
|
} |
400 |
|
|
src/Gaufrette/Adapter/AwsS3.php 1 location
|
@@ 358-367 (lines=10) @@
|
355 |
|
* |
356 |
|
* @return string |
357 |
|
*/ |
358 |
|
private function guessContentType($content) |
359 |
|
{ |
360 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
361 |
|
|
362 |
|
if (is_resource($content)) { |
363 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
364 |
|
} |
365 |
|
|
366 |
|
return $fileInfo->buffer($content); |
367 |
|
} |
368 |
|
|
369 |
|
public function mimeType($key) |
370 |
|
{ |
src/Gaufrette/Adapter/AzureBlobStorage.php 1 location
|
@@ 522-531 (lines=10) @@
|
519 |
|
* |
520 |
|
* @return string |
521 |
|
*/ |
522 |
|
private function guessContentType($content) |
523 |
|
{ |
524 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
525 |
|
|
526 |
|
if (is_resource($content)) { |
527 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
528 |
|
} |
529 |
|
|
530 |
|
return $fileInfo->buffer($content); |
531 |
|
} |
532 |
|
|
533 |
|
/** |
534 |
|
* @param string $key |