I am building a simple editor-type application in react-redux, and I want to mimic the operation of downloading and uploading json files for saving and loading data - entirely client side. The server side does not need the data. Local storage may be too small, and it would be nice to provide the user the data in a portable file they could upload on a new machine. Is this even possible, and if so how?
1 Answer
Using a blob file.
You can set the content of a new file which is temp and local, then trigger a click event to download the file.
1 Comment
Danny Ellis Jr.
I appreciate your attempt at an answer, but of the 3 possibilities provided, only 1 performs the download behavior I want - and it doesn't work. I think browsers are now blocking dynamically clicking links. Additionally, your answer does not address the upload behavior at all - but I figured that one out.