curl-and-php
Re: Set mime type for uploaded files
Date: Thu, 12 Apr 2007 09:45:47 -0700 (PDT)
Mike,
The header function is used to set a header for the Http response when a user request a php file.
If you will need to upload a file using CURL, then you will have a Content-Type: multipart / data of the whole POST request. Then, you will have a application/octet-stream mime type for the file which is attached to the POST request. The application/octet-stream is automatically set by CURL. I want to change that mime type in application/video-ms-wmv.
The command line CURL let me change this type. How I will change it using PHP CURL functions?
Sebi
----- Original Message ----
From: Mikael Grön <php@emgee.se>
To: curl with PHP <curl-and-php@cool.haxx.se>
Sent: Thursday, April 12, 2007 5:37:07 PM
Subject: Re: Set mime type for uploaded files
header("Content-type: application/octet-stream"); would be my first guess.
if that's at all what you're talking about...
Mike
Petreanu Sebastian skrev:
> Hello,
>
> I'm want to upload video files to some servers. The problem is that I
> can't change the mime type for the file selected. If I choose a .wmv
> or .mpg file the same mime type will be used: application/octet-stream.
>
> I know I can set the mime type using the command tool. But how can I
> change this mime type in PHP?
>
> Thank you,
> Sebi
>
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-04-12