feat(api): stream harvest downloads from the configured s3 bucket (#1979)

This commit is contained in:
Hampus
2026-08-24 14:39:05 +02:00
committed by GitHub
parent f004685424
commit bd4117fa0a
20 changed files with 1328 additions and 51 deletions
+1
View File
@@ -94,6 +94,7 @@ function defaultConfig(): MasterConfig {
ip_ban_exempt_ips: [],
presigned_attachment_uploads_enabled: false,
presigned_downloads_enabled: false,
presigned_harvest_downloads_enabled: true,
unfurl_ignored_hosts: [],
embeds: {
oembed_html_enabled: false,
+1
View File
@@ -93,6 +93,7 @@ export interface MasterConfig {
ip_ban_exempt_ips: Array<string>;
presigned_attachment_uploads_enabled: boolean;
presigned_downloads_enabled: boolean;
presigned_harvest_downloads_enabled: boolean;
unfurl_ignored_hosts: Array<string>;
embeds: {
oembed_html_enabled: boolean;
@@ -85,6 +85,10 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
path: ['services', 'api', 'presigned_downloads_enabled'],
parse: parseEnvValue,
},
FLUXER_API_PRESIGNED_HARVEST_DOWNLOADS_ENABLED: {
path: ['services', 'api', 'presigned_harvest_downloads_enabled'],
parse: parseEnvValue,
},
FLUXER_API_WORKER_MODE: {path: ['services', 'api', 'worker', 'mode']},
FLUXER_API_WORKER_LANE: {path: ['services', 'api', 'worker', 'lane']},
FLUXER_API_WORKER_TASK: {path: ['services', 'api', 'worker', 'task']},
@@ -49,7 +49,7 @@ export type HarvestStatusResponse = z.infer<typeof HarvestStatusResponseSchema>;
export const HarvestStatusResponseSchemaNullable = HarvestStatusResponseSchema.nullable();
export const HarvestDownloadUrlResponse = z.object({
download_url: createStringType(1, 2048).describe('The presigned URL to download the harvest archive'),
download_url: createStringType(1, 2048).describe('The temporary URL to download the harvest archive'),
expires_at: z.string().describe('ISO 8601 timestamp when the harvest download expires'),
});