{"id":23282185,"url":"https://github.com/alilotfi23/filenest","last_synced_at":"2026-05-09T10:15:12.234Z","repository":{"id":247130937,"uuid":"825091748","full_name":"alilotfi23/FileNest","owner":"alilotfi23","description":"FileNest is the easiest way to expose the contents of any web-accessible folder for browsing and sharing","archived":false,"fork":false,"pushed_at":"2024-11-09T09:49:05.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T20:18:07.582Z","etag":null,"topics":["docker","fastapi","filemanager","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alilotfi23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T18:41:53.000Z","updated_at":"2024-11-09T09:49:09.000Z","dependencies_parsed_at":"2024-07-06T19:51:27.551Z","dependency_job_id":"a2fc3cff-6d2b-4de5-8b22-00b85af1d540","html_url":"https://github.com/alilotfi23/FileNest","commit_stats":null,"previous_names":["alilotfi23/filenest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FFileNest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FFileNest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FFileNest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alilotfi23%2FFileNest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alilotfi23","download_url":"https://codeload.github.com/alilotfi23/FileNest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247492543,"owners_count":20947545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","fastapi","filemanager","python"],"created_at":"2024-12-20T00:14:55.514Z","updated_at":"2026-05-09T10:15:12.202Z","avatar_url":"https://github.com/alilotfi23.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## FileNest file manager Service\n\nFileNest is a simple API for managing folders and files in a file storage system using FastAPI.\n\n## Features\n\n- **Create Folders**: Endpoint to create folders in a specified directory.\n- **Upload Files**: Endpoint to upload files to specific folders.\n- **Download Files**: Endpoint to download files from specific folders.\n- **List Files**: Endpoint to list files within specific folders.\n- **List Folders**: Endpoint to list all folders in the storage directory.\n- **Logging**: Logging setup to record folder and file operations.\n- **Docker Support**: Docker configuration for easy deployment.\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.7+\n- Docker\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/alilotfi23/FileNest.git\n   cd FileNest\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n### Configuration\n\n1. Create a `.env` file in the root directory of your project:\n\n   ```dotenv\n   BASE_DIR=file_storage\n   ```\n\n   Replace `\"file_storage\"` with the default directory name where you want to store folders and files.\n\n\n### Usage\n\n#### Running with Docker\n\nTo run the FastAPI application using Docker:\n\n1. Build the Docker image:\n\n   ```bash\n   docker build -t fastapi-app .\n   ```\n\n2. Run the Docker container:\n\n   ```bash\n   docker run -p 8000:8000 -v /host/path/to/file_storage:/app/file_storage fastapi-app\n   ```\n\n   Replace `/host/path/to/file_storage` with the actual path on your host machine where you want to store files.\n\n3. Access the FastAPI application in your browser or using tools like `curl`:\n\n   ```bash\n   http://localhost:8000/docs\n   ```\n\n   This will open FastAPI's interactive documentation (Swagger UI) where you can test the endpoints.\n\n#### API Endpoints\n\n##### 1. Create Folder\n\n- **POST /folder**: Endpoint to create a new folder. Provide the `folder_name` in the request body.\n\n   Example using `curl`:\n\n   ```bash\n   curl -X 'POST' \\\n     'http://localhost:8000/folder' \\\n     -H 'Content-Type: application/json' \\\n     -d '{\n       \"folder_name\": \"new_folder\"\n     }'\n   ```\n\n##### 2. Upload File\n\n- **POST /file/upload/{folder_name}**: Endpoint to upload a file to a specific folder. Replace `{folder_name}` with the name of the target folder.\n\n   Example using `curl`:\n\n   ```bash\n   curl -X 'POST' \\\n     'http://localhost:8000/file/upload/new_folder' \\\n     -F 'file=@/path/to/local/file.txt'\n   ```\n\n##### 3. Download File\n\n- **GET /file/download/{folder_name}/{file_name}**: Endpoint to download a file from a specific folder. Replace `{folder_name}` with the folder name and `{file_name}` with the file name.\n\n   Example using `curl`:\n\n   ```bash\n   curl -OJL 'http://localhost:8000/file/download/new_folder/file.txt'\n   ```\n\n##### 4. List Files in Folder\n\n- **GET /file/list/{folder_name}**: Endpoint to list files in a specific folder. Replace `{folder_name}` with the folder name.\n\n   Example using `curl`:\n\n   ```bash\n   curl 'http://localhost:8000/file/list/new_folder'\n   ```\n\n##### 5. List All Folders\n\n- **GET /folder/list**: Endpoint to list all folders in the storage directory.\n\n   Example using `curl`:\n\n   ```bash\n   curl 'http://localhost:8000/folder/list'\n   ```\n\n## Logging\n\n- Logs for folder and file operations are stored within the application. Ensure the appropriate permissions are set for the log files.\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or pull requests for any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falilotfi23%2Ffilenest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falilotfi23%2Ffilenest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falilotfi23%2Ffilenest/lists"}