Use correct endpoint for file processing status checks
Update the file status polling mechanism to use the `/upload/api/file-status/{file_status_id}` endpoint. The `file_status_id` now includes the file extension when available, ensuring the correct identifier is sent to the API. This resolves issues with incorrect status retrieval and improves reliability of file processing checks.
This commit is contained in:
parent
59a228f7b4
commit
d98a69769b
@ -272,8 +272,9 @@ class UploadCog(commands.Cog, name="Upload"):
|
||||
max_attempts = 30 # 30 seconds max wait time
|
||||
for attempt in range(max_attempts):
|
||||
try:
|
||||
# Get the current file status
|
||||
file_status = await self._make_api_request("GET", f"/upload/api/file/{file_id}/status")
|
||||
# Get the current file status using the correct endpoint
|
||||
file_status_id = f"{file_id}.{file_extension}" if file_extension else file_id
|
||||
file_status = await self._make_api_request("GET", f"/upload/api/file-status/{file_status_id}")
|
||||
print(f"File status poll attempt {attempt+1}: {file_status}")
|
||||
|
||||
if file_status.get("access_ready", False):
|
||||
|
Loading…
x
Reference in New Issue
Block a user