Fakepath error when trying to upload a file

Hi, Zoran!

When I try to upload an mp3 audio file to add it to a text that has already been imported into LingQ, I get a “fakepath error” as follows: “C:\fakepath\2d8efb0f-99ad-494e-857e-b11c7fb6a083.mp3x”
This means: uploading the file isn’t possible.

Here a description why this error occurs in modern browsers (in my case: Google Chrome and Firefox):
“According to the specifications of HTML5, a file upload control should not reveal the real local path to the file you have selected, if you manipulate its value string with JavaScript. Instead, the string that is returned by the script, which handles the file information is c:\fakepath.”
See also: javascript - FakePath issue in Chrome browser - Stack Overflow

Is it possible to update the corresponding JavaScript code or do we have to wait for LingQ v5.0 to arrive?

Thanks in advance
Peter

Hi Peter…Do you get an error after clicking “save” on the lesson? When I upload accompanying audio in the past it always says “fakepath…”. It won’t save it to the lesson unless you hit “save” or “save and open” on the lesson.

edit: Just verified this is still the case now. You just need to click “save” or “save and open”. The audio file isn’t uploaded/attached until you do.

1 Like

Hi, Eric!

Excellent.
Clicking on one of those buttons you mentioned solves the problem!

Thank you very much
Peter

Yeah, it’s not really and error, it was always like that, showing “Fakepath” instead of real location. Just click on save and file will upload.

1 Like