Uploading agida, mime type chaos? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Uploading agida, mime type chaos? (/showthread.php?tid=22209) |
Uploading agida, mime type chaos? - El Forum - 09-01-2009 [eluser]nchmura[/eluser] Hi all. I am having an upload library issue - here is my situation: I am allowing the upload of "gpx" data files (gpx is an xml specification for geographic data) - the format is relatively popular in the world of mapping sites, but what I am experiencing is the mime types that I am seeing from my users are across the board - to the point of random and absurd! I have been logging the mime types the upload lib has been seeing in my log files and adding them to my mime-upload config file - but the problem is this seems like it is going to be a never ending battle - and I fear adding too many might open up some security holes. So I am looking for an alternative - but I would like to stay within the upload library (because I like it). My current line of thought is to write in some custom code/extend the upload lib to allow a validation type that checks to see if the subject file is XML, and moving on from there. I am hesitant on doing that though, so I am looking for any other suggestions! Maybe something obvious I am missing? Thanks! Uploading agida, mime type chaos? - El Forum - 09-01-2009 [eluser]pistolPete[/eluser] Validating an XML file shouldn't be to hard if you use PHP5: http://www.php.net/manual/en/domdocument.validate.php |