'Upload Fails' error when using form templates

This is my new favorite feature, thank you! :smiley: I’ll be testing out and will report any issues I may come up with; here is the first one:

I’m trying a simple form with an upload field, but the uploads field just errors:

Sorry, there was an error uploading my-image-1.jpg. Please try again.

My upload field:

- type: upload
  id: screenshots
    file_types: ".jpg, .png, .gif"
    allow_multiple: true
    label: "Screenshots"
    description: "If applicable, add screenshots to help explain your issue."
  1. I fill out the form for all required fields, including the composer Title field.
  2. Click on the “Upload” button, select a valid image file.
  3. Upload fails, and modal shows up to display the error.

I also checked the settings; the jpg file extension is in the authorized extensions list.


I’m seeing this warning when I upload from my iPhone, though the upload does actually go through. On desktop it behaves fine (windows/firefox).

Which browser/device are you using?

Actually, I may have been too hasty as I don’t think I’m seeing the same warning. Let me have another look. :eyes:

Hey @JammyDodger I only tested it on my desktop browser actually:

Arc	118.0.5993.88 (Official Build) (arm64) 
Revision	1d05652f52a55dcf9a7905af94949f2bc3a66306-refs/branch-heads/5993@{#1298}
OS	macOS Version 14.0 (Build 23A344)
JavaScript	V8
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

After a little ask around, it may already be fixed by this:

So hopefully updating your site should make everything come good. :crossed_fingers:


Confirming the upload works.

However, found another related bug: It doesn’t respect the allow_multiple: true option.

  • I tried it once now selecting 3 images to upload at once.
  • I noticed that images were uploaded, one after another, updating the preview line below the upload button.
  • Once I saved it, I found the last uploaded image shown only.

Hi Osman,

I wanted to confirm with you that we’ve deployed your site, which includes the FIX: add missing `type` to form template upload by renato · Pull Request #23935 · discourse/discourse · GitHub update, so this should resolve the issues you were running into here.

If you still have any trouble with uploading files as you were describing here, please let us know. :slightly_smiling_face:

1 Like

Hi @SaraDev My test forms are on https://brighton-offsite-september-2023.discourse.group/ actually; an expired trial version; incase you’d like to check out its logs.

I checked the versions; it is using a later commit, so it should include that fix:


Hey @gormus,

Thank you for the feedback!

There’s indeed another issue with the uploads in combination with the enable_direct_s3_uploads site setting.

We’re working on a fix and we’ll let you know when it hits tests-passed.


Hi @gormus,

We recently fixed the allow_multiple uploads issue, as well as another one regarding the file_types validation.

Please let us know if you encounter any other issues.

Thank you!