This project aims to provide a better UI for Google's Drive function and allows to quickly index all your files. Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 150+ global data centers.
- Table of Contents
- Setup Cloudfare Workers
- Self-Hosting
- Obtaining the client ID & client secret
- Build Instructions
- FAQ
- Tutorial Guides for beginners
- Credits
- License
- Choose between a Light or Dark (default) theme.
- Choose from multiple borders colours.
- Integrated Search function.
- Playable Audio/Video files for e.g. mp4 files without the need to download them to preview it.
- Works with GDrive/ShareDrive (prev. known as TeamDrive).
- Multi-level Search within your Share Drive.
- Basic Encryption support (does not include rclone based encryption/decryption)
Image, Audio, Video or Document | Format | Supported? |
---|---|---|
Video | .asf | ✅ |
Video | .avi | ✅ |
Video | .flv | ✅ |
Video | .mkv | ✅ |
Video | .mov | ✅ |
Video | .mp4 | ✅ |
Video | .mpeg | ✅ |
Video | .mpg | ✅ |
Video | .rm | ✅ |
Video | .rmvb | ✅ |
Video | .ts | ✅ |
Video | .webm | ✅ |
Video | .wmv | ✅ |
Audio | .flac | ✅ |
Audio | .m4a | ✅ |
Audio | .mp3 | ✅ |
Audio | .ogg | ✅ |
Audio | .wav | ✅ |
Audio | AAC 2.0 based | ❌ |
Document | .css | ✅ |
Document | .go | ✅ |
Document | .html | ✅ |
Document | .java | ✅ |
Document | .js | ✅ |
Document | .json | ✅ |
Document | .md | ✅ |
Document | ✅ | |
Document | .php | ✅ |
Document | .sh | ✅ |
Document | .txt | ✅ |
Image | .bmp | ✅ |
Image | .gif | ✅ |
Image | .jpeg | ✅ |
Image | .jpg | ✅ |
Image | .png | ✅ |
- A small button to grab all download links in a directory
- Automatically fetch subtitles
- Better error fallback page & debug log under files to see problems like rate limit, api limit coming from Google to know what's going on.
- Checksum support
- Display VirusTotal results for files below (135 MB VTs limit for free accounts)
- Display srt subtitles from /sub folders or same dir as video file
- Display uploader or his GMail to identify who uploaded which file
- Full epub support
- Full oAuth support
- H.265/HEVC playable files
- Image viewer should not require opening new page
- Improve search function e.g. real-time search & filter options
- Multi-language support.
- Sort function via three-dot (or hamburger) menu.
- URL encode the download link
- Folderslash issues.
- Replace Video Flash player with HTML5 one.
- JDownloader support including logins
- Remove ads from the theme, in the meantime you better use an ad-blocker (I know you already use one).
- Add Final / Beta branch
- Add refresh tokens support
- Add support for Support Http Basic Auth
- Add the ability to add multiple share drives
- Correct "How to use instructions"
- Encrypted file storage
- Integrate a working search function
- Integrate multi-level search within the team drive
- Mobile friendly
- PDF support
- Password protected home dir or entire drive
- Remove all Chinese code/comments
- Remove useless icon in the right corner which points to the outdated source
- Support multiple drives (personal & team) without changing server's code
- Fix Apostrophe (') in file names (throws an error)
- Go to the official CloudFlare Workers Website.
- Sign-up (it's free) using your eMail & password and enter a subdomain name
<-your-name->_.workers.dev
and then clickSet up
.
Now verify your current Worker
-
Verify your eMail and go to
Workers
, pressCreate a Worker
. -
Now copy the content of the index.js to the script section.
-
Edit this object in the script with the details you generated above
var authConfig = {
"siteName": "GoIndex", // Sitename
"root_pass": "", // root password, leave it blank if you don't want
"version" : "1.0.6", // Program Version
"hash" : "master", // master OR your HASH, do not leave blank (changes each time you make a commit)
"theme" : "classic", // material classic
"client_id": "****************************.apps.googleusercontent.com", // client_id from rclone config
"client_secret": "*******************", // client_secret from rclone config
"refresh_token": "******************************************", // authorized refresh token from rclone config
"root": "0AG1OSyxjvYcLUk9PVA" // ROOT_FOLDER from rclone config
};
What you need to know
- If you have connected Share Drive (Team Drive) with rclone then make sure you specify the Share Drive's root folder. For example
"root": "0AG1OSyxjvYcLUk9PVA"
. - If you want to use
My Drive
then simply write "root". For Example"root": "root"
. - Each time you make a commit/deploy to a file its HASH will change. To access the new file you have to specify the hash OR keep it default with
"hash" : "master"
.
- FREE - 100k request per day (that is what you typically choose)
- $5/month - 10M requests/month
- Log into the Google API Console with your Google account. It doesn’t matter which Google account you use but it need not be the same account as the Google Team Drive Drive you want to access.
- Select a project or create a
new project
. - Under
ENABLE APIS AND SERVICES
search forDrive
, and enable theGoogle Drive API
. - Click
Credentials
(this one) in the left-side panel DO NOT click onCreate credentials
because this will only open a setup wizard). - It will prompt you to set the
OAuth
consent screen product name, if you haven’t set one already. - Click
OAuth Consent Screen
>User Type
>External
>Application Name
. - Click
Credentials
in the left-side panel, thenCreate credentials
, thenOAuth client ID
. - Choose an application type
other
, and clickCreate
, the default name is fine.
It will show you a client ID
and client secret
. Use these values in rclone config to add a new remote or edit an existing remote.
- Install rclone software locally.
- Follow the given instructions under https://rclone.org/drive/ to bind a drive.
- Execute the
commandrclone config file
to find the filerclone.conf path
. - Open
rclone.conf
,find the configurationroot_folder_id
andrefresh_token
. - Download
index.js
in https://github.com/CHEF-KOCH/goindex-drive/blob/master/goindex/go2index/index.js and fill inroot
andrefresh_token
. - Deploy the code via Cloudflare Workers.
You can use the following pages to generate your own index.js
(the file you need for the CloudFlare Workers part).
Follow the instructions provided over here another mirror can be found over here or here.
- Copy your shared drive ID
DriveURL/drive/folders/<unique-ID>
(example:1ffgFstW0fotDfDNlU9fyNiEstrWy3b6s
the random folder ID is your folder) and set it as your root dir. - DO NOT copy the whole URL
DriveURL/drive/folders/
URL, you only need the specific and unique folder ID!
- Login into your CloudFlare account.
- Open the dashboard and click on Workers.
- Tap on Quick Edit on right corner (just beside Rename)
- In the Script tab - find
user
andpass
(they're in the roots field). - That's it. Fill them up and lock your index!
Because it currently uses Adobe Flash which is blocked by default (end-of-life product) in all Browsers. I'm working on a secure replacement.
Ads are rarely visible within the video, they are coming from the Theme. I'm going to remove that, in the meantine use an ad-blocker.
The 0:/ part indicates that external users do not have root rights (normal users) [it's only relevant if you add more than one team Drive and use a Password to protect the root dir.
This means your rate limit was reached (100k hits per day).
- Check the video demo.
- Check the step-by-step guide over here.
- How do I just download files without previewing them? Simple, just remove
?a=view
or use the download button in the right corner.
- Search Base: w3Schools
- Search Function: MakItWeb
- Source: LeeluPradhan/G-Index, the Chinese code can be found over here
- Source: ParveenBhadooOfficial
- Source: alx-xlx / goindex
- Source: maple3142
- Video: INDIA - Create Google Drive Index using CloudFlare Workers
- Worker Script (Multiple Google Accounts) : index-multiple-accounts.js
This project is forked from kulokenci/goindex-drive and re-licensed under the MIT license.
All sub-license files are includes in the root folder.