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

Change event of UInput with type="file" returns string instead of FileList #1569

Closed
mueslirieger opened this issue Mar 27, 2024 · 4 comments · Fixed by #1570
Closed

Change event of UInput with type="file" returns string instead of FileList #1569

mueslirieger opened this issue Mar 27, 2024 · 4 comments · Fixed by #1570
Labels
bug Something isn't working

Comments

@mueslirieger
Copy link

Environment

  • Operating System: Windows_NT
  • Node Version: v20.11.0
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.0
  • Nitro Version: 2.9.4
  • Package Manager: pnpm@8.8.0
  • Builder: -
  • User Config: devtools, modules, supabase, runtimeConfig, router
  • Runtime Modules: @nuxtjs/supabase@1.1.7, @nuxt/ui@2.15.0, @nuxt/image@1.4.0, @samk-dev/nuxt-vcalendar@1.0.2, @vueuse/nuxt@10.9.0
  • Build Modules: -

Version

v2.15.0

Reproduction

https://stackblitz.com/edit/nuxt-ui-xdwrzs?file=app.vue

Description

As of v2.15.0 file inputs no longer provide access to the native DOM event (#1560) which breaks the usage of UInput with type="file". For file inputs to work, the change event would have to emit event.target.files.

Additional context

No response

Logs

No response

@matikucharski
Copy link

@benjamincanac But how can I access file blob now when using type=file with UInput? That change broke my file input

Copy link
Member

Have you tried with the latest edge package until we make a proper release?

@bkuri
Copy link

bkuri commented Apr 2, 2024

@benjamincanac I just got bit by this bug after updating to v2.15.0. Downgrading to v2.14.2 fixes it.

Copy link
Member

@bkuri This has been fixed in #1570 where you'll receive files directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants