Enhance README and backend functionality for dashboard access and image upload validation

- Added a new section in README detailing the dashboard access method, features, and troubleshooting tips.
- Updated backend server startup message to allow access from mobile/emulator.
- Refactored image upload handling in the report route to validate file types and extensions, ensuring only supported image formats are accepted.
- Adjusted upload directory path for consistency.
This commit is contained in:
2025-09-26 19:54:07 +08:00
parent 11ea469b6d
commit 2a46ecb7d2
5 changed files with 55 additions and 80 deletions

View File

@@ -67,6 +67,7 @@ print("✅ FastAPI server setup complete")
# Start the server when running this script directly
if __name__ == "__main__":
import uvicorn
print("🚀 Starting server on http://127.0.0.1:8000")
print("🚀 Starting server on http://0.0.0.0:8000")
print("📚 API documentation available at http://127.0.0.1:8000/docs")
uvicorn.run(app, host="127.0.0.1", port=8000)
print("🔗 Also accessible from mobile/emulator at http://192.168.100.59:8000")
uvicorn.run(app, host="0.0.0.0", port=8000)