Coder Social home page Coder Social logo

Add save ability about firetext HOT 11 CLOSED

ferndot avatar ferndot commented on June 12, 2024
Add save ability

from firetext.

Comments (11)

HR avatar HR commented on June 12, 2024

Maybe this will help add, modify and delete files:
https://developer.mozilla.org/en-US/docs/WebAPI/Device_Storage?redirectlocale=en-US&redirectslug=WebAPI%2FDevice_Storage_API

from firetext.

ferndot avatar ferndot commented on June 12, 2024

Yes^^ I am working on it offline right now.

from firetext.

HR avatar HR commented on June 12, 2024

Do we need the saving action in the permission section in manifest file (to access api) i.e.
"permissions": {
"storage": {
"description": "Required for writing, reading and modifying files",
"access": "readcreate", "readwrite"
}

from firetext.

ferndot avatar ferndot commented on June 12, 2024

Looks like we need a "device-storage:sdcard":{ "access": "readwrite" } permission. See: https://developer.mozilla.org/en-US/docs/Apps/App_permissions.

Landed in 7bfc8d3.

from firetext.

ferndot avatar ferndot commented on June 12, 2024

bed2de2 Added save support, but the permissions system is still blocking it. Any ideas? (to test go into edit mode, and hit the save button).

from firetext.

logan-r avatar logan-r commented on June 12, 2024

Hmmm... It works for me the first time I try to save a file of a certain file name, but after that I get a NoModificationAllowedError. Maybe the file is being saved as read-only?

from firetext.

ferndot avatar ferndot commented on June 12, 2024

I think that might be it, but I don't know how to get around that
issue. The permission says read+write access. Will ask on IRC tomorrow.

from firetext.

logan-r avatar logan-r commented on June 12, 2024

Fixed it!

from firetext.

HR avatar HR commented on June 12, 2024

how?

from firetext.

logan-r avatar logan-r commented on June 12, 2024

If the code can't save the file (because another file of that name exists), it deletes the old copy and then saves the file.

from firetext.

ferndot avatar ferndot commented on June 12, 2024

👍

from firetext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.