WIP: form attachments tests
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
6003b3d7d7
commit
02b1e96d3d
@@ -170,10 +170,11 @@ export async function handleFormSubmit(req: PayloadRequest): Promise<Response> {
|
||||
if (attemptKey) {
|
||||
const running = inflight.get(attemptKey)
|
||||
if (running) {return stop(await running)}
|
||||
const earlier = await findSubmitAttempt(payload, attemptKey)
|
||||
if (earlier) {return stop(earlier)}
|
||||
// Registered before the next await, so a twin request arriving now waits for this one.
|
||||
registered = attemptKey
|
||||
inflight.set(attemptKey, new Promise<SubmitFormResult>((done) => (settle = done)))
|
||||
const earlier = await findSubmitAttempt(payload, attemptKey)
|
||||
if (earlier) {return stop(earlier)}
|
||||
}
|
||||
|
||||
if (checked.validation.fileFields.length > 0 && !canCarryFiles(checked.validation.form)) {return stop({ reason: 'delivery', success: false })}
|
||||
|
||||
Reference in New Issue
Block a user