feat: add configurable S3 object storage

This commit is contained in:
237899745
2026-07-25 13:23:11 +08:00
parent 61fa9cb820
commit d1f093685d
29 changed files with 3703 additions and 284 deletions

View File

@@ -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))