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
|
@@ 353-362 (lines=10) @@
|
350 |
|
* |
351 |
|
* @return string |
352 |
|
*/ |
353 |
|
private function guessContentType($content) |
354 |
|
{ |
355 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
356 |
|
|
357 |
|
if (is_resource($content)) { |
358 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
359 |
|
} |
360 |
|
|
361 |
|
return $fileInfo->buffer($content); |
362 |
|
} |
363 |
|
|
364 |
|
public function mimeType($key) |
365 |
|
{ |
src/Gaufrette/Adapter/AzureBlobStorage.php 1 location
|
@@ 495-504 (lines=10) @@
|
492 |
|
* |
493 |
|
* @return string |
494 |
|
*/ |
495 |
|
private function guessContentType($content) |
496 |
|
{ |
497 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
498 |
|
|
499 |
|
if (is_resource($content)) { |
500 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
501 |
|
} |
502 |
|
|
503 |
|
return $fileInfo->buffer($content); |
504 |
|
} |
505 |
|
|
506 |
|
/** |
507 |
|
* @param string $key |