GuestLens Google Drive

Run your site

Google Drive storage

GuestLens can keep every photo, video, and voice note in a Google Drive. Each event gets its own folder inside one GuestLens folder, so you can open your Drive and find the files. It works with a free Google account and with Google Workspace.

Before you choose Google Drive. Google Drive cannot hand out a direct link to a file, so every photo and video is sent through your server, much like This server. A free Google account has 15 GB, shared with Gmail and Google Photos. For an event site with a lot of video, S3-compatible storage is faster.

1. Make a sign-in client in Google Cloud

This is free and takes about five minutes. You do it once.

  1. Open console.cloud.google.com and sign in with the Google account whose Drive you want to use. Make a new project, for example "GuestLens".
  2. Open APIs and services, then Library. Find Google Drive API and press Enable.
  3. Open OAuth consent screen (in newer screens, Google Auth Platform). Choose External, give the app your site name and your email, and save.
  4. Under Audience (or Publishing status), press Publish app so the status is In production. While the status is "Testing", Google ends the sign-in after 7 days, and uploads stop.
  5. Open Credentials (or Clients), press Create credentials, then OAuth client ID. Choose Web application.
  6. Under Authorized redirect URIs, paste the address shown on the GuestLens Storage screen. It looks like https://your-site.com/admin/storage/google/callback. Press Create.
  7. Google shows a client ID and a client secret. Keep this window open.

GuestLens asks only for the drive.file permission. It can see the files it made itself, and nothing else in your Drive. Google does not ask you to verify the app for this permission.

2. Connect the Drive

The Storage screen with Google Drive chosen: the redirect URI with a copy button, the client ID and client secret fields, and the Connect Google Drive, Save, and Test connection buttons.
Admin, Storage, with Google Drive chosen.
  1. Storage driver: choose Google Drive.
  2. Authorized redirect URI: copy it into the OAuth client in Google Cloud.
  3. Client ID and client secret from Google Cloud. The secret is stored encrypted.
  4. Connect Google Drive opens the Google sign-in.
  5. Save makes Google Drive the place for new uploads.
  6. Test connection checks that the Drive can be written to.
  1. In the GuestLens admin, open Storage and choose Google Drive.
  2. Paste the client ID and the client secret.
  3. Press Connect Google Drive. Google asks you to choose the account and allow access. Google may say the app is not verified: press Advanced, then go on to your site. This is your own app, so this is safe.
  4. Google sends you back to the Storage screen, which says Connected as your account. GuestLens has made the GuestLens folder in your Drive.
  5. Press Test connection. It writes a small file, reads it back, deletes it, and shows how much of your Drive is used.
  6. Press Save. New uploads go to Google Drive from now on.

How the files are kept

Inside the GuestLens folder, the files use the same folders as on your server: events/<event id>/<year>/<month>/ for photos, videos, and their previews, and events/<event id>/guestbook/ for voice notes. Do not move or rename files in the Drive. GuestLens remembers where each file is, and a moved file stops showing. When a host deletes an event, its folder is deleted from the Drive too.

Switching storage does not move files. Files saved on your server or on S3 before you chose Google Drive stay there and keep working. Only new uploads go to the Drive. The same is true if you leave Google Drive later: keep it connected, or its files cannot be shown.

If something goes wrong