serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.57k stars 796 forks source link

The <input /> rendered by MultipleFileUploadEditor is missing multiple attribute #6646

Closed wezmag closed 1 year ago

wezmag commented 1 year ago

Before submitting the bug report, please read and check the following items

What happened?

After migrating my project to the latest version, I was not able to select multiple files at once, when using MultipleFileUploadEditor. After dig into the issue, I found out that the rendered <input /> tag is missing multiple attribute, which is different from the previous version.

What did you expect to happen?

When using MultipleFileUploadEditor, instead of selecting one file at a time, I should be able to select multiple files at once.

How to reproduce?

Use MultipleFileUploadEditor in a form.

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

6.4.2

Relevant log output

No response

Serene template version

No response

Sergen version

No response

Code editor

No response

Operating System

No response

Node.js version

No response

TypeScript version

No response

Database type and version

No response

On which device do you see the problem?

No response

On which operating system do you see the problem?

No response

On which browsers do you see the problem?

No response

On what version of the browsers do you see the problem?

No response

Additional information

The addUploadInput function in the UploadHelper does check the options for allowMultiple.

https://github.com/serenity-is/Serenity/blob/master/src/Serenity.Scripts/corelib/src/ui/helpers/uploadhelper.ts#L23

However, the getUploadInputOptions function in the MultipleFileUploadEditor does not set allowMultiple to true.

https://github.com/serenity-is/Serenity/blob/master/src/Serenity.Scripts/corelib/src/ui/editors/uploadeditors.ts#L316
VictorTomaili commented 1 year ago

Use discussions, please.

wezmag commented 1 year ago

Use discussions, please.

I thought it's a bug, isn't it?

VictorTomaili commented 1 year ago

Thank you for bringing this issue to my attention. After reviewing the case again, I can confirm that it is not currently possible to select multiple files at the same time in the multiple file upload feature. However, users can upload multiple files through drag-and-drop or by selecting them one at a time. While this may not be a bug, it is a missing feature that we should address. I will investigate the reason for this limitation and keep this issue open for further examination.

ibrahimGit123 commented 1 year ago

Hi Victor - any update on this? We are running into the same issue. Our users are used to selecting many files at the same time.

VictorTomaili commented 1 year ago

Not yet

VictorTomaili commented 1 year ago

Will be published with next serenity scripts version.

wezmag commented 1 year ago

Issue fix in v6.5.2.0 Thanks team!