Cloudflare Workers + Google Drive Directory Index | A modification of the now-defunct GoIndex project developed by donwa.
Please read LICENSE.md before using this project.
Modifications from the original:
- 1000 byte filesize measure changed to 1024
- Column headers have been changed to English (Name, Date modified, Size)
- Removed
?a=view
feature, as it's useless for my intentions. - to be determined
- Create a Google Drive remote using rclone. YOU WILL HAVE TO CREATE YOUR OWN
client_id
ANDclient_secret
VALUES. FOLLOW THIS GUIDE IF YOU DO NOT KNOW HOW TO MAKE ONE. - Run
rclone config file
in a terminal to determine the path forrclone.conf
. - Open
rclone.conf
and take note ofclient_id
,client_secret
,refresh_token
, androot_folder_id
. If you have designated a shared (team) drive instead of a folder, then you must create a folder in the selected shared drive, and take note of that new folder's ID. - Create a worker at Cloudflare Workers.
- Copy the contents of index.js and paste it into the "Script" section of the worker.
- Configure
authConfig
. (example below) - Make sure you configured everything properly by clicking on Preview and refreshing the display.
- Press Save and Deploy, and you're done!
var authConfig = {
"siteName": "GoIndex", // Website title, I recommend changing this
"root_pass": "index", // Leave blank for no password
"theme" : "material", // Available themes: material, classic
"client_id": "", // Create your own client_id and client_secret values and put them here.
"client_secret": "", // https://rclone.org/drive/#making-your-own-client-id
"refresh_token": "", // Take from rclone.conf remote
"root": "root" // Folder ID for root directory. THIS CAN NOT BE A SHARED DRIVE ID! (but it can be a folder ID inside a shared drive.)
};