Re: Please help - File Uploads, 2nd try

From: Date: Sun, 25 Feb 2001 00:54:34 +0000
Subject: Re: Please help - File Uploads, 2nd try
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41526@lists.php.net to get a copy of this message
At 06:44 PM 2/24/2001 +0000, Gustavo Vieira Goncalves Coelho Rios wrote:
Ed Lazor wrote: I upgraded my web server and now file uploads don't work. A test script is listed below. It puts the file on the server, but the file has Content-Type: image/pjpeg^M ^M pre-pended to it, thus breaking the file. Do you know why it's doing this and how to fix it? This happens because you are dealing with DOS text in a unix environment. You can use dos2unix utility in order to correct this problem. Remenber, always transfer text files unix->dos->unix using ascii mode.
I don't understand. It's appending Content-Type to all of the files. I tested a few other files like tgz files and it put a content type in them as well. Since the files are being uploaded in a browser form, shouldn't the unix / dos issue be eliminated? -Ed

« previous php.general (#41526) next »