jvilk / BrowserFS

BrowserFS is an in-browser filesystem that emulates the Node JS filesystem API and supports storing and retrieving files from various backends.
Other
3.07k stars 217 forks source link

"Error: undefined: XHR error." when running on file:// #220

Closed 1j01 closed 1 year ago

1j01 commented 6 years ago

It fails because it gets a status of 0 and decides that's a failure, even tho the response data is there.

That is not a pretty error message: not a pretty error message

Now, if there are reasons for this to not be supported (using --allow-file-access-from-files for chrome), the error could at least say something about that; but I can't think of why it shouldn't be able to work.

jvilk commented 6 years ago

Agreed that the error message could be better, but note that this is a project maintained by one person in his spare time. I assumed that the status would be 200 on a success, and didn't think about accessing file:// URLs where HTTP status codes don't apply.

Seems like an easy fix. I'll happily accept a PR, otherwise I'll try to get to this soon.

james-pre commented 1 year ago

Closing since BrowserFS has stopped using XHR.