Google Drive ফাইল স্টোরেজ
Google Drive ফাইল সার্ভার: Google Cloud-এ OAuth client, অ্যাকাউন্ট সংযোগ, ফোল্ডার, রিজিউমেবল আপলোড ও স্ট্রিমিং ডাউনলোড। প্রিমিয়াম।
Premium plugin storage-google-drive: Google Drive becomes a file server type, next to Local, Direct, FTP, SFTP and the S3-style buckets (File servers). Files are kept in a folder of a Google account you connect once.
Before you start
- Open console.cloud.google.com, make a project (or pick one).
- APIs & Services → Library: enable the Google Drive API.
- OAuth consent screen: External, give the app a name and your e-mail, add the scope
https://www.googleapis.com/auth/drive.file, add your own Google account as a test user (or publish the app). - Credentials → Create credentials → OAuth client ID, type Web application.
- Under Authorized redirect URIs paste the redirect address the plugin shows on its page (Extensions → Google Drive Storage → Setup guide; it ends in
/plugins/storage-google-drive/oauth). - Copy the client id and client secret.
The plugin page repeats these steps with the exact redirect address of your site.
Adding the server
Infrastructure → File Servers → Add, type Google Drive:
- Client id / client secret from the steps above.
- Connect Google account - sends you to Google, you sign in and allow the app, Google sends you back; the connected account's e-mail then shows on the form. Disconnect forgets the token.
- Folder - the name (or id) of the Drive folder the files go into; it is made on first use when it does not exist. Shared drive id when the folder lives on a shared drive.
- Upload piece (MB) - the size of each resumable upload piece.
- Direct links - off: every download streams through the site (default; keeps files private). On: a file is made readable by link on Drive and the browser fetches it from Google.
Save, then Test on the servers list: it checks the token and the folder and reads the quota.
How files move
- An upload from the browser lands on the site first in parallel pieces (Uploads); when it is complete the file is sent to Drive in resumable pieces and the local copy is removed. Big files survive a dropped line.
- A download streams from Drive through the site with Range support: download managers resume, the AIO Player seeks.
- Deleting on the site deletes on Drive; the trash and purge rules of the site apply as for any server.
- The servers list and the dashboard show the Drive quota (used / total of the connected account).
Good to know
- Google's refresh tokens of an app in testing mode expire after seven days; publish the consent screen for a permanent connection.
- The
drive.filescope only sees files the plugin made itself, which is what you want. - Keep Direct links off unless the files are public anyway.
- Needs the
storage-google-driveaddon on the licence (The licence key).