0

I want to write php code to upload files to google drive and share link. I need to integrate this to my website. so users can upload files to google drive and once they uploaded I can receive file link.

is this possible? are there any github sources to start? I am seeking help to get right start. please advice if anyone has done this before?

shpathuala
  • 53
  • 6
  • i think it may help you : https://stackoverflow.com/questions/25707891/google-drive-php-api-simple-file-upload#:~:text=jpg%22)%3B%20%2F%2F%20create%20and,'. – Harish Jul 26 '20 at 13:36

1 Answers1

0

I understand that you want to write a PHP code to get the file link from data uploaded to Drive. If that is true, then you should explore the Drive API PHP reference. You can see an example code in the Drive API quickstart and use it as a model.

To get the data from the uploaded file you can use get and read the variables webContentLink and/or webViewLink (for the download link and the view link, respectively). Please, remember to use * on the request parameter fields to receive all the data. Don't hesitate to ask me further questions to help you better.

Jacques-Guzel Heron
  • 2,480
  • 1
  • 7
  • 16