P
P
PAJCH2015-12-21 17:48:42
JavaScript
PAJCH, 2015-12-21 17:48:42

How to know if the file is correct?

Hello, please answer, how do I know that the file is correct?
That is, the user created a file with the jpg extension, how to find out the authenticity of the file?
How to implement it? Thanks in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Miku Hatsune, 2015-12-21
@PAJCH

Check by mime type, or there is an option with getimagesize
Yes, and if you google it, there are a lot of handy libraries for uploading files in PHP that have the functionality you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question