src/Gaufrette/Adapter/AwsS3.php 1 location
|
@@ 340-349 (lines=10) @@
|
337 |
|
* |
338 |
|
* @return string |
339 |
|
*/ |
340 |
|
private function guessContentType($content) |
341 |
|
{ |
342 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
343 |
|
|
344 |
|
if (is_resource($content)) { |
345 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
346 |
|
} |
347 |
|
|
348 |
|
return $fileInfo->buffer($content); |
349 |
|
} |
350 |
|
} |
351 |
|
|
src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location
|
@@ 393-402 (lines=10) @@
|
390 |
|
* |
391 |
|
* @return string |
392 |
|
*/ |
393 |
|
private function guessContentType($content) |
394 |
|
{ |
395 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
396 |
|
|
397 |
|
if (is_resource($content)) { |
398 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
399 |
|
} |
400 |
|
|
401 |
|
return $fileInfo->buffer($content); |
402 |
|
} |
403 |
|
} |
404 |
|
|
src/Gaufrette/Adapter/AzureBlobStorage.php 1 location
|
@@ 474-483 (lines=10) @@
|
471 |
|
* |
472 |
|
* @return string |
473 |
|
*/ |
474 |
|
private function guessContentType($content) |
475 |
|
{ |
476 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
477 |
|
|
478 |
|
if (is_resource($content)) { |
479 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
480 |
|
} |
481 |
|
|
482 |
|
return $fileInfo->buffer($content); |
483 |
|
} |
484 |
|
|
485 |
|
/** |
486 |
|
* @param string $key |