0
votes

Hi, everyone. I have a use case for my system where I want to save my user's photos/files. I want to upload these photos/files into Google Drive storage and save the link in my database.

It actually works :).

But the problem is when I upload a photo/file, its uploaded to specific user's account (the user that currently logged-in in browser). How could I use a single account for my entire system, so every user can upload their files/photos to my system in same Google Drive storage (which is my account)?

Thank you

1

1 Answers

0
votes

You need to provide an OAuth authentication on your webpage from where users will be able to login with Google account. When this is done, your account will act as a one stop service account for all the users to sign in and upload the files.

Follow the official Google documentation on Authorizing your app with Google drive to know more about the process. You need to get client ID and secret ID in order to validate other users so that they can make request through your developer account.

Follow the documentation on Upload Files to upload the files to Drive API.