gormus
(Osman Gormus)
October 19, 2023, 10:56pm
1
This is my new favorite feature, thank you! 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
attributes:
file_types: ".jpg, .png, .gif"
allow_multiple: true
label: "Screenshots"
description: "If applicable, add screenshots to help explain your issue."
I fill out the form for all required fields, including the composer Title field.
Click on the “Upload” button, select a valid image file.
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.
6 Likes
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.
gormus
(Osman Gormus)
October 23, 2023, 4:15pm
4
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 11.8.172.15
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
After a little ask around, it may already be fixed by this:
discourse:main
← discourse:form_template_upload_type
opened 09:21PM - 13 Oct 23 UTC
Its omission was breaking uploads when `enable_direct_s3_uploads` was `true`.
So hopefully updating your site should make everything come good.
3 Likes
gormus
(Osman Gormus)
October 23, 2023, 7:12pm
6
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.
SaraDev
(Sara Devlaeminck)
October 23, 2023, 8:26pm
10
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.
1 Like
gormus
(Osman Gormus)
October 23, 2023, 9:07pm
12
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:
committed 01:12PM - 20 Oct 23 UTC
The `name` argument doesn't do anything, and 'title' should actually be 'label'
4 Likes
renato
(Renato Atilio)
October 23, 2023, 9:15pm
13
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
.
5 Likes
renato
(Renato Atilio)
November 3, 2023, 1:29pm
15
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!
5 Likes