I’m working on a site that allows users to customize photo greetings cards, much like moonpig. I’m trying to take as much load off the server as possible. It would be nice if when a user uploads an image it could be stored in localStorage instead of uploading it to the server straight away, then it could be uploaded if the user makes an order. This way only photos from cards that have been purchased will be stored on the server. This could make a huge difference in how much space the uploads take up on the server, since there’s nothing stopping users continuously uploading images without making a purchase, which would fill the server quickly.
I have extracted the image data from the FileReader and stored it in localStorage. This can then be used as the image source. It works fine, but I was wondering if this is OK or is it a no no?