storage.get
See original GitHub issueI have the following code. ` var filePath = “Settings.json”
storage.set(filePath, "{'balance': 1000.21, 'num':100, 'is_vip':true, 'name':'foo'}")
.then(data => {
console.log(data);
})
.catch(err => {
console.error(err);
});
storage.get(filePath, (err, data) => {
if (err) {
console.error(err)
} else {
console.log(data);
}
});`
The data is written to the Settings.json under C:\Users\thardes2\AppData\Roaming\MyApp, but when I try to get them with the get function I get the following error:
The file in path C:\Users\thardes2\AppData\Roaming\MyApp/Settings.json is not a valid json file
So the format of the path is wrong. As you can see, I am just using the example provided in the README. Any idea or solution to this?
Thank you 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Storage - Getting started - JavaScript - AWS Amplify Docs
AWS Amplify Storage module provides a simple mechanism for managing user content for your app in public, protected or private storage buckets.
Read more >Storage.getItem() - Web APIs - MDN Web Docs
The getItem() method of the Storage interface, when passed a key name, will return that key's value, or null if the key does...
Read more >How to use the aws-amplify.Storage.get function in aws ... - Snyk
To help you get started, we've selected a few aws-amplify.Storage.get examples, based on popular ways it is used in public projects.
Read more >Objects: get | Cloud Storage
For examples of performing object downloads with different Cloud Storage tools and client libraries, see the Downloading Objects guide. Required permissions.
Read more >File Storage - Laravel - The PHP Framework For Web Artisans
The local driver interacts with files stored locally on the server running the Laravel application while the s3 ... $contents = Storage::get('file.jpg');.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, @thardes2 I hope that it will solve the issue ! #https://github.com/Cocycles/electron-storage/commit/5b81c4d5f95eb48a0bc18146cf3d09ab2f48c942
Hi thardes2, there is an issue on Windows, I’ll solve it as soon as I’ll get to a computer!