DStore is an educational project that demonstrates a file upload and download mechanism using Discord's API. The project focuses on uploading files in chunks to Discord and downloading them by fetching each chunk and assembling them. Please note that this project is intended for educational purposes only.
- File Upload: Upload files to Discord in smaller, manageable 25MB chunks.
- File Download: Download files by fetching each chunk and assembling them on the client side.
- Database: Inserts chunks related to a file in database
Before using DStore, ensure you have the following installed:
- Node.js
- Discord API credentials (create a Discord bot and obtain the token)
-
Clone the repository:
git clone https://github.com/fero1xd/DStore.git
-
Install dependencies:
cd DStore pnpm install
-
Configure your Discord API credentials:
Create a
.env
file in the project root and add your Discord bot token:APPLICATION_ID= APPLICATION_SECRET= TEST_CHANNEL_ID= PGUSER= PGHOST= PGDATABASE= PGPASSWORD= PGPORT=
-
Build the application:
pnpm run build # OR pnpm run build:dev
- To Upload a file
pnpm start:build --upload ./path/to.file
- To Download a file
pnpm start:build --download file_id --path /save/here/
- To Download files from web
pnpm start:build --web
And then visit http://localhost:3000/{fileid}
This project is licensed under the MIT License.
- Discord.js - Discord API library for Node.js.
This project is for educational purposes only. Use it responsibly and respect the terms of service of Discord.