Refactor file upload to use SDK instead of XMLHttpRequest
Some checks failed
Build and Push Docker Images / changes (push) Successful in 4s
Build and Push Docker Images / build-backend (push) Successful in 50s
Build and Push Docker Images / build-frontend (push) Failing after 47s

Replaced manual XMLHttpRequest implementation with the SDK's `uploadFile` method for handling file uploads to presigned URLs. This simplifies the code, leverages built-in features like progress tracking, and improves error handling. Added token extraction and upload progress updates to maintain functionality.
This commit is contained in:
2025-03-14 00:05:26 +01:00
parent 0cf5498762
commit b47dbaeb0b
2 changed files with 45 additions and 18 deletions

View File

@@ -17,7 +17,8 @@ logger.info(f"Starting app!!!")
app = FastAPI(
title=settings.PROJECT_NAME,
version=settings.VERSION,
openapi_url=f"{settings.API_VERSION_STR}/openapi.json"
openapi_url=f"{settings.API_VERSION_STR}/openapi.json",
debug=True,
)
# Set up CORS middleware