Bound request bodies and artifact uploads (Refs #94)
CI / checks (push) Successful in 4m34s

This commit is contained in:
2026-10-09 16:52:37 -04:00
parent 8fcb8312a3
commit 9eb3aa84c3
44 changed files with 603 additions and 79 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
import { artifactFormBody } from '$lib/server/request-body.js';
import { json } from '@sveltejs/kit';
import {
createScript,
@@ -38,7 +39,7 @@ export async function GET({ url }: { url: URL }) {
// name, scopeType, scopeValue, notes, releaseVersion, kind (defaults to 'script'),
// content (file). Configs may alternatively send `text` as a form field.
export async function POST({ request, url }: { request: Request; url: URL }) {
const form = await request.formData();
const form = await artifactFormBody(request);
const name = String(form.get('name') ?? '').trim();
const notes = form.get('notes') ? String(form.get('notes')) : undefined;
let scopeType: ScopeType | null;