STLViewer normally stores uploaded models in its built-in storage. If you want the actual model files to live in an account you already control, you can connect Google Drive. After that, new uploads from your signed-in account are saved in a dedicated folder in your Drive instead.
The setup takes only a few clicks — no API tokens to generate, no credentials to copy, and no bucket to configure. You authorise STLViewer through Google's standard sign-in screen, and it handles everything else.
This guide covers what the connection does, how to set it up, what to expect afterwards, and how to manage or disconnect it later.
What changes
- New uploads go to your Google Drive. Once the connection is active, every new model you upload while signed in is stored in a folder called STLViewer in your Drive.
- Existing models stay where they are. Models uploaded before you connect Drive keep working in STLViewer's built-in storage. They are not moved automatically.
- Your files remain in Drive if you disconnect. Disconnecting removes STLViewer's records for those models, but it does not delete the files from your Drive.
- You do not need to configure anything in Google. There is no developer console to open, no API to enable, and no settings to change on the Google side. The connection is made entirely through Google's standard sign-in flow.
- STLViewer can only see files it created. The permission you grant uses the
drive.filescope. This means STLViewer has no access to any existing files or folders in your Drive — only to the files it uploads itself. - Drive uploads do not use your STLViewer storage limit. The model files are stored in your own Google account, against your Google Drive quota.
This feature is only for registered users. Uploads made without an account always use built-in storage.
Before you start
You need:
- a Google account with Google Drive (any Google account works, including free ones)
- a signed-in STLViewer account
Step 1 - Click "Connect Google Drive" on your profile page
- Sign in to STLViewer.
- Open your Profile page.
- Find the Cloud storage card.
- Click Connect Google Drive.
STLViewer prepares a secure authorisation request and opens the Google sign-in screen. If you are already signed in to Google in the same browser, the sign-in step may be skipped and you will land directly on the permission screen.
Step 2 - Choose your Google account
If you are signed in to more than one Google account, Google shows an account picker. Choose the account whose Drive you want to use for STLViewer uploads.
If you see a Google sign-in form instead of an account picker, enter the email address and password for the Google account you want to use.
Step 3 - Allow the Drive permission
Google shows a permission screen listing what STLViewer is asking for:
See, edit, create, and delete only the specific Google Drive files you use with this app.
This is the drive.file scope. It is the narrowest permission that lets an app create and read files. It means STLViewer cannot see your existing photos, documents, or any other files in Drive — only the models it uploads itself.
Click Allow to grant the permission. If you click Cancel instead, no connection is made and you will be returned to your profile page with a message saying the connection was not completed.
Step 4 - STLViewer finishes the setup
After you click Allow, Google sends STLViewer a secure token. STLViewer then:
- Creates a folder called STLViewer in the root of your Drive, if one does not already exist. All future uploads from your STLViewer account will be stored inside this folder.
- Encrypts and saves the connection in your account. The token is encrypted at rest. STLViewer never shows it back to you and never sends it to the browser.
- Redirects you back to your profile page with a "Google Drive connected" message.
The Cloud storage card now shows Google Drive with a Connected badge.
Using your own storage
- Uploading works the same as before. New signed-in uploads go to your Drive folder. The file picker and upload progress work identically to before.
- You can check that it works in Drive. Upload a test model, then open Google Drive. You should see a STLViewer folder at the root of your Drive with a new file inside.
- Sharing and viewing still work through STLViewer. A visitor does not need access to your Google account or Drive. STLViewer reads the file from Drive and streams it to the viewer.
- Deleting a model in STLViewer also deletes the file from your Drive. This is permanent.
- Models still expire. Each shared model has a retention period. When it expires, STLViewer deletes the file from your Drive folder. If you need to keep the original forever, save a separate copy outside the STLViewer folder.
Managing the connection
Status. The Cloud storage card can show Connected, Needs reconnection, or Access revoked. If there is a problem, the most recent error appears below the status badge.
If you revoke access in Google's security settings. You can remove any app's access to your Drive by visiting myaccount.google.com/permissions. If you remove STLViewer there, its token stops working immediately. The next time STLViewer tries to read or write a file in your Drive, it will detect the failure and mark your connection as Needs reconnection. Shared links for Drive-stored models will show "temporarily unavailable" until you reconnect. Reconnecting is a fresh OAuth flow: go to your profile page and click Connect Google Drive again.
The STLViewer folder in Drive. Do not rename or move the STLViewer folder in Drive. STLViewer locates the folder by name. If you rename or move it, STLViewer will not find it and will create a new empty folder instead on the next upload. Existing shared models whose files are in the renamed folder will become unavailable.
Disconnecting. When you click Disconnect, STLViewer asks you to type DISCONNECT to confirm. Disconnecting removes STLViewer's records for all models stored in your Drive. Their share links stop working. The files themselves stay in your Drive — STLViewer does not delete them. If you want to clean up, open the STLViewer folder in Drive and delete its contents manually.
Switching accounts. There is no one-click account switch. Disconnect the current account, then click Connect Google Drive again and sign in with the other Google account.
Troubleshooting
"The connection was not completed" or you are returned to the profile page without a success message. You clicked Cancel on Google's permission screen. Go back to your profile page and click Connect Google Drive again. This time, click Allow when Google shows the permission screen.
"Google Drive connected" message appears but the status shows Needs reconnection shortly after. This can happen if the Google token expires before STLViewer uses it, or if there was a brief error. Try disconnecting and connecting again.
"An active storage connection already exists." You already have a storage connection — either R2 or Drive — on your account. Only one own-storage connection is allowed at a time. Disconnect the current one from your profile page, then connect Google Drive.
"Google Drive is not configured on this server." The STLViewer deployment you are using does not have Google Drive enabled. This can happen with self-hosted or preview environments. Check whether the deployment supports Google Drive.
Uploaded models show "temporarily unavailable" for viewers. This means STLViewer cannot reach your Drive. The most likely cause is that you removed STLViewer from your Google account permissions. Visit your profile page to check the connection status, and reconnect if needed.
Frequently asked questions
What exactly can STLViewer see in my Google Drive?
Only the files it created itself. The drive.file scope restricts access to files uploaded by the app. STLViewer has no visibility into your existing documents, photos, spreadsheets, or any other content in Drive.
Can I rename the STLViewer folder in Drive?
It is better not to. STLViewer finds the folder by searching for the name "STLViewer". If you rename it, STLViewer will create a new empty folder on the next upload and will not be able to stream the files in the renamed folder.
Does connecting Google Drive use my Google Drive storage quota?
Yes. Model files are stored in your Drive and count against your Google Drive quota. Google accounts typically include 15 GB of free storage shared across Drive, Gmail, and Photos.
Do I need to do anything on the Google side before connecting?
No. There is no Google Cloud Console to open, no API to enable, and no settings to change in your Google account. Everything is set up through the sign-in flow STLViewer provides.
Can I use a Google Workspace account?
Generally yes, as long as your organisation allows third-party apps to access Drive with the drive.file scope. If your organisation restricts this, the connection will fail after the Google permission screen. Contact your Google Workspace administrator to check.
Will connecting Drive move my existing models?
No. Only new signed-in uploads go to your Drive folder. Existing models stay in built-in storage and keep working as before.
What happens to my files if I disconnect?
The files stay in the STLViewer folder in your Drive. STLViewer only removes its own model records, which means the old share links stop working. You can find and keep your files by opening Drive directly.
Can I keep a model in Drive forever?
Not yet. Today each model still has an expiry date. When it expires, STLViewer deletes the file from your Drive folder. A keep-forever option for own-storage models is planned, but it is not available yet.
