Problem with Extension ... .txt instead of .jpg

See all posts See thread Reply

Re: Problem with Extension ... .txt instead of .jpg new!
by DJo, 15 years, 3 months ago
No idea ?Reply
Re: Problem with Extension ... .txt instead of .jpg new!
by colin, 15 years, 3 months ago
It is indeed strange. It shouldn't behave like this. The MIME type is properly detected as being an image... but for some reason, the source file doesn't have an extension:
file_src_name_ext :
It should be something like:
file_src_name_ext : jpg

Because of this inconsistency, the file is considered as a potential script, and adds the .txt extension.

What is the filename of the file you try to upload? What browser do you use? On which system? Which version of PHP? Apache?

As a temporary fix, you can disable the script checking:
$handle->no_script = false;
Reply