I have a sever which people can upload files to. The problem is that some of the filenames are mangled (dont have any extension) and so I cannot immediately determine file type.
The type of the image is typically going to be able to be inferenced from the header information of the file.