Welcome Guest, Not a member yet? Register   Sign In
CI 2.1.2 - Unable to upload XML...
#2

[eluser]Narf[/eluser]
The most recent ones of the mentioned topics would probably have comments saying that MIME-type detection depends on the server environment and it is not 100% guaranteed to be correct - that's just not possible to achieve. What you can do is to check what each of these methods say the type is and add it to config/mimes.php:

Code:
//Method 1:
$finfo = finfo_open(FINFO_MIME);
var_dump(finfo_file($finfo, '/path/to/your/file.xml');
finfo_close($finfo);

// Method 2:
file --mime /path/to/your/file.xml // (run in shell command line, on your host)

// Method 3:
var_dump(mime_content_type('/path/to/your/file.xml'));


Messages In This Thread
CI 2.1.2 - Unable to upload XML... - by El Forum - 11-09-2012, 08:47 AM
CI 2.1.2 - Unable to upload XML... - by El Forum - 11-09-2012, 09:43 AM
CI 2.1.2 - Unable to upload XML... - by El Forum - 11-15-2012, 02:35 PM
CI 2.1.2 - Unable to upload XML... - by El Forum - 11-15-2012, 04:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB