feat: add configurable S3 object storage
This commit is contained in:
@@ -500,7 +500,7 @@ async fn list_history(
|
||||
status: String,
|
||||
output_format: String,
|
||||
error_message: Option<String>,
|
||||
storage_path: Option<String>,
|
||||
has_storage: bool,
|
||||
}
|
||||
|
||||
let now = Utc::now();
|
||||
@@ -517,7 +517,7 @@ async fn list_history(
|
||||
status::text AS status,
|
||||
output_format,
|
||||
error_message,
|
||||
storage_path
|
||||
COALESCE(storage_key, storage_path) IS NOT NULL AS has_storage
|
||||
FROM task_files
|
||||
WHERE task_id = $1
|
||||
ORDER BY created_at ASC
|
||||
@@ -540,7 +540,7 @@ async fn list_history(
|
||||
output_format: file.output_format,
|
||||
error_message: file.error_message,
|
||||
download_url: if file.status == "completed"
|
||||
&& file.storage_path.is_some()
|
||||
&& file.has_storage
|
||||
&& task.expires_at > now
|
||||
{
|
||||
Some(format!("/downloads/{}", file.id))
|
||||
|
||||
Reference in New Issue
Block a user