src/Gaufrette/Adapter/AwsS3.php 1 location
|
@@ 354-363 (lines=10) @@
|
351 |
|
* |
352 |
|
* @return string |
353 |
|
*/ |
354 |
|
private function guessContentType($content) |
355 |
|
{ |
356 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
357 |
|
|
358 |
|
if (is_resource($content)) { |
359 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
360 |
|
} |
361 |
|
|
362 |
|
return $fileInfo->buffer($content); |
363 |
|
} |
364 |
|
|
365 |
|
public function mimeType($key) |
366 |
|
{ |
src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location
|
@@ 387-396 (lines=10) @@
|
384 |
|
* |
385 |
|
* @return string |
386 |
|
*/ |
387 |
|
private function guessContentType($content) |
388 |
|
{ |
389 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
390 |
|
|
391 |
|
if (is_resource($content)) { |
392 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
393 |
|
} |
394 |
|
|
395 |
|
return $fileInfo->buffer($content); |
396 |
|
} |
397 |
|
} |
398 |
|
|
src/Gaufrette/Adapter/AzureBlobStorage.php 1 location
|
@@ 538-547 (lines=10) @@
|
535 |
|
* |
536 |
|
* @return string |
537 |
|
*/ |
538 |
|
private function guessContentType($content) |
539 |
|
{ |
540 |
|
$fileInfo = new \finfo(FILEINFO_MIME_TYPE); |
541 |
|
|
542 |
|
if (is_resource($content)) { |
543 |
|
return $fileInfo->file(stream_get_meta_data($content)['uri']); |
544 |
|
} |
545 |
|
|
546 |
|
return $fileInfo->buffer($content); |
547 |
|
} |
548 |
|
|
549 |
|
/** |
550 |
|
* @param string $key |