JavaScript file in Firefox

I need to allow users of my web application to save files on the local file system after working with the editor implemented using javascript (to work in the browser) I heard about the FileWriter API in HTML5, but I'm not sure if it is supported in any version of Firefox, in particular FireFox 5.

Does anyone have alternatives besides server-side processing so that users can save files to their local file system (of course, with user permission) in FireFox. When I read, Google Chrome supports the FileWriter API, although I have not been able to run it yet.

+4
source share
2 answers

FileWriter - a working draft of Google

The Firefox team is also working on an implementation of FileWriter: https://bugzilla.mozilla.org/show_bug.cgi?id=557540

+5
source

No, Firefox does not support FileWriter , and the standardization of this API has been abandoned ( 1 , 2 ). http://www.w3.org/TR/file-writer-api/ now states:

Work on this document has been discontinued and should not be referred to or used as the basis for implementation.

It looks like the API hasn't even provided the function that you seem to be looking for :

The API does not give you access to the local file system, and the sandbox is not part of the file system. Instead, it is a virtual file system that looks like a complete file system for a web application. This is not necessarily related to the local file system outside the browser.

This means that the web application and the desktop application cannot share the same file at the same time. The API does not allow your web application to go beyond the browser to files that can also run desktop applications.

You can use localStorage or IndexedDB to store data on the client side, although not in an arbitrary file that the user can select through filepicker.

You can write an extension that provides the necessary API for JS content. Since 2015, it is unclear what technology you should use for this .

Downloadify (Adobe Flash initiating download) is also often mentioned when discussing this issue. This topic mentions a data-based alternative: URI .

+4
source

All Articles