Welcome Guest, Not a member yet? Register   Sign In
Uploading agida, mime type chaos?
#1

[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!
#2

[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




Theme © iAndrew 2016 - Forum software by © MyBB