Skip to content

Commit 5e3369f

Browse files
Stephen G. PopeStephen G. Pope
authored andcommitted
fix to file returning
1 parent 9aee17d commit 5e3369f

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

routes/v1/media/convert/media_convert.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,8 @@ def convert_media_format(job_id, data):
6464

6565
cloud_url = upload_file(output_file)
6666
logger.info(f"Job {job_id}: Converted media uploaded to cloud storage: {cloud_url}")
67-
68-
# Return JSON response with file URL
69-
response = {
70-
"file_url": cloud_url
71-
}
7267

73-
return response, "/v1/media/convert", 200
68+
return cloud_url, "/v1/media/convert", 200
7469

7570
except Exception as e:
7671
logger.error(f"Job {job_id}: Error during media conversion process - {str(e)}")

routes/v1/video/thumbnail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def generate_thumbnail(job_id, data):
5757
logger.info(f"Job {job_id}: Thumbnail uploaded to cloud storage at {file_url}")
5858

5959
# Return the URL of the uploaded thumbnail
60-
return {"file_url": file_url}, "/v1/video/thumbnail", 200
60+
return file_url, "/v1/video/thumbnail", 200
6161

6262
except Exception as e:
6363
logger.error(f"Job {job_id}: Error during thumbnail extraction - {str(e)}")

0 commit comments

Comments
 (0)