aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
758 stars 127 forks source link

Error "Uncaught Error: No suitable file reader found for" when there is a symbolic link in the file path #140

Open R-W-C opened 3 years ago

R-W-C commented 3 years ago

Let's say we have an MP3 file with a valid path:

"C:\web\TagReader\Music \Michael Jackson - Thriller\01. Michael Jackson - Beat It.mp3"

but folder "Music" is actually a symbolic link pointing to folder "D:\MyAwesomeMusicCollection".

jsmediatags cannot read the file, although the path is valid. It comes with the error message "Uncaught Error: No suitable file reader found for"

There is a workaround. Just use URLS.

Something like

http://localhost/TagReader/Music/Michael%20Jackson%20-%20Thriller/01.%20Michael%20Jackson%20-%20Beat%20It.mp3

It would be nice if this could be fixed.

Side note to PHP developers who want to make an URL for an audio file which has a symbolic link in the path. PHP function realpath() resolves the symbolic link.

Example:

"C:\web\TagReader\Music \Michael Jackson - Thriller\01. Michael Jackson - Beat It.mp3"

becomes

"C:\web\TagReader\D:\MyAwesomeMusicCollection\Michael Jackson - Thriller\01. Michael Jackson - Beat It.mp3"

So you have to create the path without using PHP function realpath() !

aadsm commented 3 years ago

Can you show me the JavaScript code you're using?