chore: Refactor getBackgroundImages to improve image URL generation

This commit is contained in:
Sean Morley
2024-06-12 19:59:53 +00:00
parent 8eb9f11708
commit 71363026b2
5 changed files with 50 additions and 2 deletions

View File

@@ -6,6 +6,12 @@ import { deleteObject, ensureBucketExists, uploadObject } from "$lib/server/s3";
import type { RequestEvent } from "@sveltejs/kit";
import { generateId } from "lucia";
/**
* Handles the POST request for uploading a file to S3 storage.
*
* @param event - The request event object.
* @returns A promise that resolves to a response object.
*/
export async function POST(event: RequestEvent): Promise<Response> {
try {
const contentType = event.request.headers.get("content-type") ?? "";