* Mongodb DB Implementation, may or may not be done in future, no ETA * Admin Page to Handle Index Better, eg. Database access, adding users, deleting users etc., no ETA * Rewriting Documentation, no ETA. Anyone can Help
npm install @googledrive/index2.3.7
https://drive.google.com/drive/u/0/folders/0AOM2i7Mi3uWIUk9PVA - 0AOM2i7Mi3uWIUk9PVA is its ID.
root, eg. Drive of Simple Gmail Account.
https://example.com
"roots":[
{
"id": "root",
"name": "Drive One",
"protect_file_link": false,
// "auth": {"username":"password"} / Remove double slash before "auth" to activate id password protection /
},
]};
``
Multiple ID Config
* Add this code for each drive. see cloud flare workers code for more info. (requires common sense)
``
"roots":[
{
"id": "root",
"name": "Drive One",
"protect_file_link": false,
// "auth": {"username":"password"} / Remove double slash before "auth" to activate id password protection /
},
{
"id": "root",
"name": "Drive Two",
"protect_file_link": false,
// "auth": {"username":"password", "username1":"password1"} / Remove double slash before "auth" to activate id password protection /
},
]};
``
Service Account
* Multiple Service Accounts are supported.
* set "service_account": false to "service_account": true
* Replace {} with data from service account file.json
Multiple Users Password
* For single user
``
// "auth": {"username":"password"} /* remove double slash at starting of this line to use password. /
``
* For multiple users (unlimited users)
``
{
"id": "",
"name": "Drive Two",
"protect_file_link": false,
// "auth": { "user1":"pass1", "user2":"pass2", } /* remove double slash at starting of this line to use password. /
},
``
* where "user1":"pass1" and "user2":"pass2" are combinations.
* if users adds "auth":{"":""} empty values then the site will ask for authentication but user can enter without entering any data by clicking submit.
Use of .password File
* This is directory encryption added by the original author.
* Add a .password file your required password in your folder which you want to protect, each folder should have its own .password file.
* The password is stored inside the Google Drive Folder, not the index and the .password file is hidden an cannot be accessed using Index.
* Example use https://bit.ly/3tBxXJN and password is thispassword
Brand Customization
* In Latest Release, you can rebrand the Index as per your needs. Read the workers file to change UI and config.
Auth0 Integration
* Please Note that auth0.com Free Plan allows 7000 active members per month only. Active members are those who have logged in once in that particular month.
* Cloudflare KV is used by this method, in Free Workers Plan, it's very limited and you cannot use it much, to avoid this ask your users to login and not clear the site cookies unless important. We suggest you upgrade to 5 USD plan of Workers if you face quota exceeded error on Cloudflare.
* Make a auth0.com account and while signup select advanced settings so you can edit the tenant name.
* Tenant Name looks like this hashhackers.auth0.com where you can have your own sub-domain on auth0.com, then verify your email.
* In Applications, Make New App, and select Regular Web Applications.
* In the app, go to settings and from there you can copy your client id and secret to be used on Cloudflare.
* Scroll down and see option Allowed Callback URLs, enter your website or workers URL that you will use for Index in following manner.
* https://example.com/auth, make sure you enter https:// and /auth.
* Scroll down and see option Allowed Logout URLs, enter your website address where you would like to redirect when user logs out.
* Now In Authentication, Go to Database and open the Database that is shown there, You will see option Disable Sign Ups to stop username and password signup option when needed.
* In Authentication, you can go to Social and setup social login.
* To disable signup using Social Networks, if you wish to do that one day, go to Auth Pipeline and then Rules. Create New Rule, and find the Rule Template for Disable social signups. Add your App Client ID in the line number 2, then save it.
* Now come back to Cloudflare, and in Index code, enable auth0 with option true.
* Now enter Tenant Domain, make sure to use https:// eg. https://example.auth0.com
* Enter your Client Id, Secret, Index Callback URL with /auth and Logout URL.
* Now in Cloudflare, there is a option for Workers KV, Create Namespace with any name, suggested is AUTH_STORE_NS.
* Now go to your worker for index, Click on Settings, then Click on Variables, at the end of the page you'll see KV Namespace Bindings, Enter variable name AUTH_STORE and then select the Name Space you created and Save it.
* It's done. If you face any problem, Go to Index Discussion Group and ask your question with full details, where you're stuck. Before that please try doing this yourself.
Second Domain Systems
* set second_domain_for_dl to true first in UI Config.
* set domains_for_dl and video_domains_for_dl to your new index you're going to make below in top config near service accounts.
* then make separate index on different Cloudflare account with second-domain workers code.
* change only refresh_token or SA and Drive IDs, don't touch anything else.
* It's done.
Themes
* There are 25 Themes from bootswatch official Bootstrap Themes.
* You can check Theme from bootswatch.com before selecting.
* To Change theme, first generate the code, paste in Cloud flare Workers and then select one theme code from below and paste it in line 61 of worker script.
| Themes | | | | | |
|-----------|---------|---------|---------|--------|----------|
| cerulean | cosmo | cyborg | darkly | flatly | journal |
| litera | lumen | lux | materia | minty | pulse |
| sandstone | simplex | sketchy | slate | solar | spacelab |
| superhero | united | yeti | vapor | morph | quartz |
| zephyr |
Audio and Video
* Poster for Video is added as default.
* Fetch Video Poster from Google Drive, uses default if none available.
Search Limitations
* Search only works if you use Shared Drive ID or root.
* Search won't work or the bar won't appear if you're using Folder ID inside from root or Shared Drive. In Newer versions bar will appear but search won't work.
Linking Anasty Repo
* Based on Anasty's Idea.
* Check Anasty's repo for more details to attach files and folders with this APP.
Sorting by Name or Modified Time
* Find params.orderBy in workers code L623 and L710.
* use params.orderBy = 'folder,name,modifiedTime desc'; to sort by File and Folder Name.
* use params.orderBy = 'folder,modifiedTime desc,name'; to sort by Modified Time.
* A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
Get Google_Client_ID and Secret and Generate Token
* Google is depreciating OOB, read blog post here.
* Old authorizations users did on our App will keep working.
* New Users will see new Client ID and Secret on our APP.
* Instead of updating generate new code.
* Currently we do not have a guide for custom workflow. But we'll update it in time.
Upcoming Changes
* Adding More Features from other Indexes.
Other Indexes
* List of Few Indexes
Credits
* Base Source: maple3142 and yanzai
* CSS: Bootstrap and Bootswatch
* API: Google Drive API
* jQuery
* PDF Viewer: pdf.js
* Audio and Video Player: plyr.io
* CDN: jsDelivr
* Minified JS: Toptal and [JavaScript Minify Tool]()
* Obfuscator: JavaScript Obfuscator Tool
* Hosting: Gitlab and npm
* Website Hosting: js.org and GitHub
* Dev Editor Used: ATOM
* Made for: Cloudflare Workers
* Several Different Fixes by SpEcHiDe, Adnan Ahmad, Prashanth C A, cheems, iSumitBot and Unmentioned Forgotten Contributors.
Disclaimer
* This project is not associated with Google, this project uses Google Drive API to Index Files and Folders.
* These Index's are written by someone else, possibly by donva and maple3142.
* Beta Version is redesigned using Bootstrap from Alpha Version by Parveen Bhadoo.
* This Repo was imported from yanzai and then modified for personal use.
Legal Disclaimer
* Hash Hacker's or Bhadoo Cloud or Parveen Bhadoo doesn't own the websites created using this software. The Software is under MIT License and Free to use for everyone personally or commercially. If any site is found using the name in title as the project or related names, shouldn't be assumed to be associated with us. The Software provides full configuration to the user to update and change the names of title, contact information for the published website using this software.
* As an open-source Software, it can be used by good and bad actors both, eg. the use of YT-DL, read full post here.
Sponsors
Support this Project

* Contribute to this project or improve this README.
License
* MIT License
$3
* ETH 0xaf25cdc7967213172a745453a64e8a0b59686729
* BTC 3BgSznxLB5u4WiuVERb1dKWeTqSSwK9NPW
* BAT 0xaf25cdc7967213172a745453a64e8a0b59686729`