Upload files using React and Flask
- Clone the repository using
git clone
- Navigate to the directory using
cd React-Flask-Upload
- Navigate to the server directory using
cd backend
- Create a virtual environment and activate it using
python3 -m venv env
andsource env/bin/activate
- Upgrade pip to the latest version using
pip install --upgrade pip
- Install flask using
pip install flask
- Run the server using
flask run
in the virtual environment - The server will be running on
localhost:5000
- Navigate to the client directory using
cd frontend
- Install the dependencies using
npm install
- Run the client using
npm start
- The client will be running on
localhost:3000
- Select a file from your computer
- Click the upload button
- Upload progress and spinner will be displayed
- The file will be uploaded and saved in the local directory
backend/app/Downloads