MOV upload update
Deploy / deploy (push) Successful in 2m53s

This commit is contained in:
twotalesanimation
2026-07-21 23:31:32 +02:00
parent 243fbbce7a
commit 519fe2ad33
3 changed files with 124 additions and 15 deletions
+19
View File
@@ -279,6 +279,25 @@ export async function uploadToHetzner(
return { key };
}
/**
* Generate a presigned PUT URL for direct browser-to-Hetzner uploads.
* The caller must use the returned `key` to commit the upload via the API.
* Expires in 1 hour by default.
*/
export async function generateHetznerPresignedUploadUrl(
key: string,
contentType: string,
expiresIn: number = 3600
): Promise<string> {
const { client, bucket } = await buildHetznerClient();
const command = new PutObjectCommand({
Bucket: bucket,
Key: key,
ContentType: contentType,
});
return getSignedUrl(client, command, { expiresIn });
}
/**
* In-process cache for Hetzner key existence checks.
* Positive hits (key exists) are cached indefinitely for the process lifetime