Skip to content
This repository was archived by the owner on May 27, 2022. It is now read-only.

Commit 100275e

Browse files
committed
Add MIME Type caveat
1 parent 792d9b5 commit 100275e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ GZip's `zlib.deflate` and `zlib.inflate` compression filters are used.
5555

5656
[Sodium](https://www.php.net/manual/en/book.sodium.php) extension provides the backend for the
5757
encrypted stream with [`XChaCha20-Poly1305`](https://www.php.net/manual/en/function.sodium-crypto-secretstream-xchacha20poly1305-init-push.php) algorithm.
58+
59+
## MIME types detection caveat
60+
61+
Some Flysystem adapters like the Local one try to guess the file mime type by
62+
its nature (content or extension): in such cases it will fail due to the custom
63+
extention and the encrypted content.
64+
Other adapters like the Aws S3 one allow you to specify it manually (for ex.
65+
with the `ContentType` key in the Config): it is a good idea to always manually
66+
inject it, if you like the `Filesystem::mimeType($path)` call to be reliable.

0 commit comments

Comments
 (0)