File manager that allows you to upload and download files to and from Discord and manage them in a windows explorer.
Yes, even above 25MB. Currently tested limit for a single file is about 750MB (+/- 50MB) and 9 GB in multifile mode.
Supported functions:
- Manage files (Upload, Download, Delete, Rename, Move, Modify)
- Manage folders (Create, Delete, Rename, Move)
Not even alpha. Created for fun and ONLY for fun. Dont use it as important storage, since it active development, contains bugs, LOT of bugs and im still making LOT of breaking changes. Use it only for testing and playing around.
Please look at the Known issues section for more information.
Has been tested MAINLY on Windows 10 and on some third party webdav clients, like OwlFiles, WinSCP, dolphin.
Create a Guild (server) for the bot to use. Save its id. You can also use existing server.
Create a bot with admin permissions and invite it to your server. If you already have a bot, you can use it.
- Create a app.
- Once you created app, you should be in the app menu. Go to
BOT
tab and create a bot. - Once you created bot and you on bot page, click to
Show Token
. Save your bot token. - Once you saved your token, scroll to the bottom to
Privileged Gateway Intents
. - Enable
MESSAGE CONTENT INTENT
. - Goto
OAuth2/Url-Generator
tab and selectbot
scope. - Scroll down to
Bot Permissions
and selectAdministrator
. - In the bottom you will find url. Your url should look like this:
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot
. Copy the link and visit it. Follow the instructions to invite the bot to your server.
-
Install NodeJS (Tested on 16) and Yarn (Tested on 1.22.10).
-
Clone this repo.
-
Navigate to the root of the project and run
yarn install
. -
Create a file named
.env
in the root of the project. There example fileenv.example
, so you can just copy it and rename to.env
. You should fill the file with your data (token, server id). Other settings are optional and documented in the file.
If you dont have opportunity to use .env file, you can set environment variables instead, they should have the same names as in.env.example
file. -
To run the bot, run
yarn boot
. This will compile the project and start the bot.
Warning! At the moment SSL support is not complete. You can use it, but you have to be aware of potential security issues, since TLS_REJECT_UNAUTHORIZED is set to 0 because of some temponary problems with requests.
If you want to use SSL, you have to generate a certificate. You can use this service or this one. You can also use your own certificate.
- Generate a certificate.
- Rename your certificate to
cert.pem
and your private key toprivKey.pem
and if you have chain certificate, rename it tochain.pem
. - Put your certificate and private key to
certs
folder. (You have to create manually, its included in.gitignore
). - Enable HTTPS in
.env
file. SetENABLE_HTTPS
totrue
.
Files in discord are not encrypted. Because of this, the server supports encryption via chacha20 algorithm. To enable encryption:
- Set
ENCRYPT
totrue
in.env
file. - set
ENCRYPT_PASS
to your password. This password will be used to encrypt and decrypt files.
WARNING. If you lose this password, you WILL NOT be able to decrypt your files.
WANING. Unless its look to work stable, encryption feature still being tested. Im not experienced in cryptography, so i cant guarantee that it will be secure or stable. Use it at your own risk.
You can set authorization for the server. To do this, set AUTH
to true
in .env
file.
Then add your username and password to .env
file. Set USERS
to username:password
. You can add multiple users, just separate them with ,
. For example: USERS=username1:password1,username2:password2
. At the moment, only basic authorization is supported.
Once server started, the webdav server will be available on port 3000.
Windows explorer will support webdav out of the box. You can now add network drive to localhost:3000 and use DICloud as a regular drive.
You can also open the webdav server in your explorer directly. Just go to http://localhost:3000/
.
-
Problems with downloading big (~50+ MB) files from windows explorer directly.
This is limitation of the windows explorer, which limiting downloading files to 50MB. This repo contains a registry file, which can be used to increase this limit (up to 4GB). Script may be found in: scripts/webdav.reg
If you still having issues with this, i recommend to use WinSCP for downloading big files.
You can also download big files directly via http. For example, you can use this url:http://localhost:3000/file.ext
orhttp://localhost:3000/my/path/to/file.ext
to download filefile.ext
from root folder or from/my/path/to
folder respectively. -
Uploading and downloading big files (~1GB+) is working unstable, so if you really need it, split big file into smaller chunks (lets say 100MB, with any archiver like 7zip or WinRAR) and upload them one by one. After downloading, you can merge them back.
Current tested limit for a single file is about 750MB, but i guess it depends on your internet connection. For now no other solution for this, sorry. -
Half-working SSL support. You can use it, but you have to be aware of potential security issues, since TLS_REJECT_UNAUTHORIZED is set to 0 because of some problems which i dont know how to fix for the moment. But if you dont care much about targeted intercetion of your data, you can use it.
Will do some work in the future to fix this. -
Half working encryption support. You can use it, but you have to be aware of potential security issues, since im not experienced in cryptography and i cant guarantee that it will be secure. But for now it looks like its working pretty stable.
-
Not all webdav clients are working as expected. Will do some work in the future to fix this.