Based on @Nvico great answer i was able to upload files to google drive, the problem is the code on the answer creates a new file each time, is there a way given an already created file id to update its content directly (using Files:update api) without creation of a new one ?
currently my solution is to use Files:delete api each time i want to update the file to remove the old one then create a new file using @Nvico code
Instead of using the drive.files.insert endpoint, you can use almost the same code to send an update request to the drive.files.update endpoint:
The main difference is in the request URL and method: