Writing to files (in a contained environment)
I know what you're thinking. This is dangerous, however if you provide an API for us to safe either images or JSON files in a specified directory (specific to our script), and limit the amount of storage we can use (like Google Chrome), then it really is quite safe.
I mean, how are we gonna fill up the device storage if we are limited to 10mb or less? How will we "hack" their device with an image file? And i mention saving JSON files because of JavaScript's native support for them and the fact that they are useful if we want to store, for example, a fair amount of game data (if we were having some sort of racing game or something). We could save progress and scores, deaths, wins, losses, and more.
You could even, if we had 10mb, limit the JSON to something like 3mb and leave the rest for images because realistically JSON doesnt take too much space compared to images.
Please sign in to leave a comment.
1 Comments