How to upload and update same named file to google drive in Flutter

621 views Asked by At

Let me give an example first. Say, I upload a file to google drive with the name of 'MyFile.txt'. After that, when the 'MyFile.txt' is updated in my device I want to upload this file again. But when I upload the file again, a new file is created on my google drive instead updating the previous file. Now my questions are:

  1. How to upload the file without creating a new file on drive?
  2. After upload the file, How to download this file by searching with its name(not with file id)?

Please tell me with example in Flutter (Dart).

1

There are 1 answers

1
hisam On

You can use GoogleAPIs Package provided by Dart Team. It supports DriveAPI v2 and DriveAPI v3. With those APIs, you can manage files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.

I hope it will help.