Spaces:
Build error
Build error
| title: File Sharing System | |
| emoji: 🔥 | |
| colorFrom: pink | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 4.40.0 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Share files and notes instantly. | |
| # File Storing and Sharing System | |
| This project is a file storing and sharing system built using Gradio for the front-end interface and MongoDB for the back-end database. The system allows users to upload files, which are then stored and managed within a specified directory. URLs for accessing these files are generated and stored in a MongoDB collection, making it easy to share and access the uploaded files. | |
| ## Key Components | |
| ### Gradio | |
| Gradio is used to create the front-end interface, allowing users to interact with the file upload system through a simple and intuitive GUI. | |
| ### MongoDB | |
| MongoDB is used to store metadata about the uploaded files, specifically the URLs where these files can be accessed. This project connects to a MongoDB instance using credentials stored in environment variables for security. | |
| ## Project Structure | |
| ### Environment Variables | |
| - `SECRET_KEY`: Authetication Key to access data. | |
| - `MONGO_USERNAME`: MongoDB username. | |
| - `MONGO_PASSWORD`: MongoDB password. | |
| - `REST_URI`: MongoDB URI for connecting to the database. | |
| ## How to Run | |
| 1. **Set Environment Variables**: Make sure to set the `SECRET_KEY`, `MONGO_USERNAME`, `MONGO_PASSWORD`, and `REST_URI` environment variables with your MongoDB credentials and URI. | |
| 2. **Install Dependencies**: Ensure you have `gradio`, `pymongo`, and other necessary packages installed. | |
| 3. **Run the Application**: Execute the script to start the Gradio interface and handle file uploads. | |
| ```bash | |
| python your_script.py | |
| ``` | |
| ## Conclusion | |
| This project provides a simple yet effective solution for file storing and sharing. By leveraging Gradio for the front-end and MongoDB for the back-end, it ensures a seamless experience for users to upload and manage their files with easy access through generated URLs. |