-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
3rd partyErrors coming from foreign projects we either enable or rely onErrors coming from foreign projects we either enable or rely onwontfixThis will not be worked onThis will not be worked on
Description
Checklist
- I added a descriptive title
- I searched for other issues and couldn't find a solution or duplication
- I already searched in Google and didn't find any good information or help
What happened?
When <input type="file"> is used to upload a file, its true path is hidden, and C:\fakepath\ is prepended to file name instead, see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#value
This logic, specified for JS, works well enough for PyScript, but when trying to parse the returned path by standard Python path libraries, os.path and pathlib.Path, both of them fail to process it correctly.
To reproduce, see https://jolaf.pyscriptapps.com/basename-issue/latest/
(just upload any small file)
What browsers are you seeing the problem on? (if applicable)
Chrome
Console info
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3rd partyErrors coming from foreign projects we either enable or rely onErrors coming from foreign projects we either enable or rely onwontfixThis will not be worked onThis will not be worked on