framework
framework copied to clipboard
[Storage] In case provided path is directory path at S3 there are error on getMimeType()
Description
We have webhook on upload any object in specific dir.
It works for uploaded(created) directory and we've detected that if you create directory this webhook send this key to our controller it can receive it as FileInterface but if you want to receive its mimetype it throws exception like:
Unable to retrieve the mime_type for file at location: some_dir/subdir
As I understand storage can work with directory as with files but it should be separated and user should be able to detect is it a file or directory.
How To Reproduce
$dirPath = 'some_dir/subdir';
$awsFile = $this->storage->file($dirPath);
$awsFile->getMimeType();
Additional Info
| Q | A |
|---|---|
| Framework Version | 2.13.1 |
| PHP version | 8.1.3 |