0

I have a HTML5 web app that saves user configuration in a JSON format. At the moment the Data is saved in LocalStorage.

I've seen other apps backup files to google drive (such as draw.io).

enter image description here

I want to save the users config file in their google drive and be able to retrieve it again.

Can this be done in the frontend utilising JavaScript and how?

RogerHN
  • 584
  • 1
  • 11
  • 31

1 Answers1

1

You can use the create and get methods of the Google Drive API. The examples on those pages have Javascript tabs which you may be able to use as a starting point.

E.J.
  • 44
  • 3
  • Do you have any examples using the `v3` version? Because the v3 doesn't have. This looks like a simple thing, yet it's very complicated to set up because of the lack in the documentation. – RogerHN Dec 17 '19 at 16:13
  • Check out [this answer](https://stackoverflow.com/questions/34905363/create-file-with-google-drive-api-v3-javascript/44527113?noredirect=1#answer-35182924). It looks like for v3, you might have to assemble your request manually. – E.J. Dec 18 '19 at 14:17