question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v-model for file input type

See original GitHub issue

Versions:

  • @inertiajs/inertia version: ^0.8.6
  • @inertiajs/inertia-vue3 version: ^0.3.10

Describe the problem:

How does v-model should work in an example if we can’t use it with file input type? VueJS will throw the error “v-model cannot be used on file inputs since they are read-only.” This should be updated in documentation. We need to use @change for file input.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
reininkcommented, Apr 5, 2021

Updated: https://github.com/inertiajs/inertiajs.com/commit/73f6e1a16e502405c4c5d93db4eee73da47e29d0

In the future, please post documentation related issues in that repo. 👍

1reaction
dillinghamcommented, Apr 5, 2021

@bedus-creation

<input type="file" @input="form.avatar = $event.target.files[0]" />
Read more comments on GitHub >

github_iconTop Results From Across the Web

v-model doesn't support input type="file" - Stack Overflow
I can not use v-model with file input, Vue says I must use v-on:change . Ok so I can use v-on:change , but...
Read more >
Vue.js: Using v-model with input type="file" - Laracasts
Hi there, is it possible to use v-model with input type="file"? Thanks. ... With few lines of JavaScript, you can display the input...
Read more >
V:model in input type file doesn't exist - Get Help - Vue Forum
Hi , PLEASE HELP i have table article(id,title,description,image) and i need when i click at button edit Article i need fill the form...
Read more >
Vue Tip // v-model on custom component input type="file"
A few days ago I needed to use v-model in a component of my own that I needed to capture a file in...
Read more >
v-model doesn't support input type="file" · Issue #24 - GitHub
I tried to get file name using v-model directive, but it did not work. ... I think, determination of listining event in directive's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found