Closed halillusion closed 2 years ago
For the forbidden extensions, see #132 . I did implement the concept in a different way than in your commit b9198ef, but the result is the same.
As for your commit 7802a41, I am not sure it is a good idea. I think it is best done outside of the class, after the upload. Indeed, the class is able to determine the source file MIME type with quite a lot of code to try to be accurate. But here, for the destination file, your code doesn't really check the real MIME type, but infers it from the extension, which is not reliable enough.
The name of the source file; may change after the upload process is complete. The same possibility exists for extensions. I needed this when I wanted to get the last name and extension after an install. I think it might work.
I understand, but it is not reliable enough, and people wouldn't be able to trust this MIME type
Okay, no problem. This library, which can initially determine the MIME type, may detect it incorrectly after some operations it performs. Like you said, it's a possibility; and not reliable enough. Thanks.
It has also been ensured that measures can be taken with extensions for forbidden files. #132