Skip to content

Alikavari/sharefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI File Sharing Application

This is a FastAPI web application that serves as a platform for sharing files between a server and a client. The application creates uploads and downloads directories on the running directory, enabling seamless file sharing via a web browser.

Features

  • File Download: Clients can access and download files placed in the uploads folder on the server by opening the URL in a web browser (http://<server_ip>:<port>).
  • File Upload: Clients can upload files via the browser, and the uploaded files will be placed in the downloads folder on the server.

Requirements

  • Python: Version 3.12 or higher
  • Python venv
  • Docker (optional, for containerized deployment)
sudo apt install python3
sudo apt install python3.12-venv
sudo apt install docker

Installation and Running the Application

Using Docker

  1. Build the Docker image:
docker build -t sharefile-app .
  1. Run the Docker container:
docker run -it --rm -u u1 -p 8000:8000 -v $(pwd):/app sharefile-app

Without Docker

  1. Create a virtual environment:
python3 -m venv myenv
  1. Activate the virtual environment:
source myenv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
uvicorn sharefile:app --host 0.0.0.0 --port 8000 --reload

Usage

  1. Access the Application: Open your browser and navigate to http://<server_ip>:8000.

  2. File Sharing:

    • Place files in the uploads folder for clients to download.
    • Clients can upload files, and the uploaded files will be stored in the downloads folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published