P
P
pomaz_andrew2020-01-16 13:33:50
css
pomaz_andrew, 2020-01-16 13:33:50

Is it possible to save a file to a specified path in JS?

We develop an application on Angular v4. Created the ability to cache data locally using ForerunnerDB. Now there is a need to move away from this caching method and switch to the JSON format as a way to store the cache. They began to look towards the FileSaver.js library, but it does not have the ability to specify the save path. Maybe someone faced the problem of saving the file to the specified path and found a solution (library?). Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Adamos, 2020-01-16
@Adamos

No scripts in the browser had, do not have, and will not have the right to pry into the local disk system. Basically. For basic security reasons.
To save the cache locally, there is LocalStorage.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question