According to Exploring File System APIs in
Browser support and storage restrictions
You may need the flag --allow-file-access-from-files if you are debugging your application from file:// . Do not use these flags in SECURITY_ERR or QUOTA_EXCEEDED_ERR FileError.
Running chrome with --allow-file-access-from-files , --unlimited-storage and possibly obsolete --unlimited-quota-for-files ; also --unsafely-treat-insecure-origin-as-secure=file:///path/to/directory/* with the set --user-data-dir=/path/to/directory .
Interestingly, when chrome opens, a notification is displayed
An unsupported command line flag is used: --unsafely-treat-insecure-origin-as-secure . Stability and security will suffer.
There are other flags that are not specified, which can be used; ignored notification, which could still be set and get localStorage in file: protocol, spcecifically files in file:///path/to/directory/* , although
navigator.webkitTemporaryStorage.requestQuota(1024*1024, function(grantedBytes) { console.log(grantedBytes) }, errorHandler);
logged 0 where errorHandler is
function errorHandler(e) { console.log(e) }
Also
function writeFile(fs) { fs.root.getFile("file.txt", {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) {
entered
FileError {code: 7, name: "InvalidStateError", message: "An operation that depends on state cached in an inβ¦he state had changed since it was read from disk."} code:7 message:"An operation that depends on state cached in an interface object was made but the state had changed since it was read from disk." name:"InvalidStateError" __proto__:DOMError
Question: What changes are needed for launch flags, workarounds, or other approaches that would allow using the webkitRequestFileSystem protocol in file: :?
javascript google-chrome html5-filesystem chromium
guest271314
source share