From d98a69769b6c6e0b9b6eefd03a7b9933774c87ac Mon Sep 17 00:00:00 2001 From: Slipstream Date: Wed, 21 May 2025 12:34:54 -0600 Subject: [PATCH] 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. --- cogs/upload_cog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cogs/upload_cog.py b/cogs/upload_cog.py index c8a6ae3..22806f4 100644 --- a/cogs/upload_cog.py +++ b/cogs/upload_cog.py @@ -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):