web: fix file upload form (cherry-pick #18808 to version-2025.12)#18884
web: fix file upload form (cherry-pick #18808 to version-2025.12)#18884rissson merged 1 commit intoversion-2025.12from
Conversation
* web: fix file upload form name mismatch and modal submit promise handling Fixes the following error: FileUploadForm.ts:74 POST http://authentik.localhost:9000/api/v3/admin/file/ 405 (Method Not Allowed) (anonymous) @ fetch.ts:81 fetchApi @ runtime.ts:206 await in fetchApi request @ runtime.ts:136 await in request adminFileCreateRaw @ AdminApi.ts:191 adminFileCreate @ AdminApi.ts:206 send @ FileUploadForm.ts:74 submit @ Form.ts:363 (anonymous) @ ModalForm.ts:54 handleEvent @ lit-html.ts:2109 n @ helpers.ts:117Understand this error Form.ts:403 authentik/forms: API rejected the form submission due to an invalid field that doesn't appear to be in the form. This is likely a bug in authentik. {detail: 'Response returned an error code'} (anonymous) @ console.ts:39 (anonymous) @ Form.ts:403 Promise.catch submit @ Form.ts:376 (anonymous) @ ModalForm.ts:54 handleEvent @ lit-html.ts:2109 n @ helpers.ts:117Understand this error runtime.ts:140 Uncaught (in promise) ResponseError: Response returned an error code at mR.request (runtime.ts:140:15) at async mR.adminFileCreateRaw (AdminApi.ts:191:26) at async mR.adminFileCreate (AdminApi.ts:206:9) - align file upload rename field with api name so validation errors map correctly -improve custom filename extension logic to avoid double or incorrect extensions - prevent unhandled promise rejections from modal submit click handler and show missing-form errors to users * rev * wip * Update ModalForm.ts Signed-off-by: Dominic R <dominic@sdko.org> * scope better * fix what it validates against --------- Signed-off-by: Dominic R <dominic@sdko.org>
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version-2025.12 #18884 +/- ##
===================================================
+ Coverage 92.97% 93.22% +0.24%
===================================================
Files 946 946
Lines 51949 51949
===================================================
+ Hits 48302 48431 +129
+ Misses 3647 3518 -129
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-2d804815868bfe07d5b00344922c917c3be99692
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-2d804815868bfe07d5b00344922c917c3be99692Afterwards, run the upgrade commands from the latest release notes. |
Cherry-pick of #18808 to
version-2025.12branch.Original PR: #18808
Original Author: @dominic-r
Cherry-picked commit: eef8e57