Refactor file upload to use SDK instead of XMLHttpRequest
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user