Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong condition in FormDataAddon and not converting FileList to file[] format #201

Closed
hamidreza4dev opened this issue Sep 11, 2023 · 1 comment

Comments

@hamidreza4dev
Copy link

Hi,
the problem is that FileList is not an instance of Array and this will cause an issue.

if (value instanceof Array) {

it can simply be fixed by changing the condition to:

if (value instanceof Array || value instanceof FileList) {
// ...    
@elbywan
Copy link
Owner

elbywan commented Sep 12, 2023

Hey @hamidreza4dev,

Thanks for raising the issue 🙇.

I just published v2.7.0 which now supports passing FileList instances to the form data addon.

@elbywan elbywan closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants