This project implements a simple decentralized cloud file sharing system using Flask, IPFS, and Blockchain technology. Users can upload files, which are stored securely on IPFS with metadata recorded on a blockchain for traceability.
git clone https://github.com/anushreejha/BlockShareCloud
cd BlockShareCloud
python -m venv venv
source venv/bin/activate # For macOS/Linux
# On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
mkdir uploads downloads
ipfs daemon
python app.py
http://127.0.0.1:5000/
- File Upload: Users can upload files via a simple web interface, and these files are stored on IPFS.
- Blockchain Storage: Metadata such as the file name and IPFS hash is stored on a simple blockchain for traceability.
- File Download: Users can download files by providing the IPFS hash, and the file is served with its original name and extension.
- Flask Web Framework: The application is built with Flask, offering an easy-to-use structure.
- IPFS for Decentralized Storage: Files are stored in a distributed manner using IPFS.
- When a user uploads a file, it is saved temporarily in the uploads folder.
- The file is uploaded to IPFS, and its hash is returned.
- The hash and the original file name are recorded on the blockchain.
- A simple blockchain implementation records details about each file (IPFS hash and file name).
- The blockchain ensures the integrity and traceability of the file metadata.
- The user provides the IPFS hash to download the file.
- The system fetches the file from IPFS and saves it to the downloads folder.
- The downloaded file is renamed to its original file name with the correct extension based on metadata stored in the blockchain.
- Go to the web interface.
- Upload a file through the provided form.
- After uploading, you will receive an IPFS hash for the file.
- Provide the IPFS hash in the download form.
- The system retrieves the file from IPFS and serves it for download with its original name and extension.
- Make sure the IPFS daemon is running locally on port 5001 (default for IPFS).
- The blockchain is a simple in-memory structure and does not persist between server restarts.