Welcome Guest, Not a member yet? Register   Sign In
upload allowed_types issue
#2

[eluser]Seppo[/eluser]
The upload library uses the mimes config file to validate the uploads.
Right now, by default, CSV accepts:
'text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'

and XLS:
'application/excel', 'application/vnd.ms-excel'

as you can see all XLS mime types are included in CSV... That's what is causing your error... The problem is that the browsers detemine how is the mime type named, and some browser might send you a CSV as 'application/excel'... So you can delete the two excels options froms CSV, however you may not accept some CSV files, depending on the browser.

I can't believe the upload library works this way... you set the extension, the extension looks for the mime types that can be used and tries to matches the browser mime type... Is really awful and a bit stupid.


Messages In This Thread
upload allowed_types issue - by El Forum - 04-19-2008, 08:19 AM
upload allowed_types issue - by El Forum - 04-19-2008, 08:27 AM
upload allowed_types issue - by El Forum - 04-19-2008, 08:31 AM
upload allowed_types issue - by El Forum - 05-05-2008, 12:24 PM
upload allowed_types issue - by El Forum - 05-06-2008, 11:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB