JamesHeinrich / getID3

http://www.getid3.org/
Other
1.13k stars 245 forks source link

Unable to determine .gpx file #438

Closed tomswinkels closed 4 months ago

tomswinkels commented 4 months ago

Unable to determine .gpx file

array:7 [▼
  "GETID3_VERSION" => "1.9.23-202310190849"
  "filesize" => 57278
  "filepath" => "/tmp"
  "filename" => "phplYdzdi"
  "filenamepath" => "/tmp/phplYdzdi"
  "encoding" => "UTF-8"
  "error" => array:1 [▶
    0 => "unable to determine file format"
  ]
]

File: https://file.io/WDiq2DyWuaL9

JamesHeinrich commented 4 months ago

Your sample file has been deleted before I could look at it. Also, I don't remember adding .gpx support to getID3?

tomswinkels commented 4 months ago

Maybe you can support .gpx?

JamesHeinrich commented 4 months ago

What would you expect getID3 to do with .gpx ? GPX is just XML, so you can easily load it directly in PHP with something like $GPX = new SimpleXMLElement(file_get_contents($filename)); see: https://www.php.net/manual/en/simplexml.examples-basic.php

tomswinkels commented 4 months ago

We use getID3 to get the mime type of files.

JamesHeinrich commented 4 months ago

Basic GPX format detection added in https://github.com/JamesHeinrich/getID3/commit/a94fb704aee97e9b9d7b461eda6dc022f44805ed