Skip to content

dimuth93/Assignment02_SS

Repository files navigation

Uploading a file to Google Drive Using OAuth Access Token

This project is based on implementing a web application that consumes the service of an OAuth Authorization Server and an OAuth Resource Server. You can download this project and use this for testing purposes.

Implementation of the project.

1.Download this project as a .zip file.

2.Then sign into your Google account and go the following link to enable Google Drive API. https://developers.google.com/drive/api/v3/quickstart/php

enable_drive_api

(This will allow you to use credentials for a quickstart project. If you want to enable it for a customized project you'll have to enable it using Google developer's API console) https://console.developers.google.com

api_console

3.Download credentials.json file

json_download

4.Download Google API PHP client .zip file using this link. https://github.com/googleapis/google-api-php-client/releases

apiclient download

5.Extract the downloaded project into WAMP/XAMPP server path. (C:\wamp64\www) or (C:\xampp\htdocs)

6.Extract Google API PHP client .zip file. And copy 'src' and 'vendor' folders into root folder of this project. (Root=C:\xampp\htdocs\Assignment02_SS)

copy_srcand_vendor

7.Copy credentials.json file to Root folder and rename it as 'oauth-credentials-file.json'

8.Now run your Web app using Apache server (http://localhost/Assignment02_SS)

sign_in_first_page

9.Press 'Sign in with Google' button and proceed. You'll ask permissions by Google Drive API for file management.

grant_permission_confirm

10.As a final step you can upload files to Google Drive Using 'Choose file' button. If the upload is successfull 'Your call was successfull' message will appear.:+1:

select_file

upload_completed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published