• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Vuetify – File upload convert to base64 format

Resolved: Vuetify – File upload convert to base64 format

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have file input for image
I’m trying to read it and convert the file into base64 string
I can’t get my RESULT to run… please HELP!
enter image description here

Answer:

You’re seeing this error because a FileReader‘s readAsDataURL takes a Blob as parameter.
You are currently passing it undefined (check by running console.log(file)), because img is a File (which is a Blob), and it doesn’t have a files property.
Passing it the file should work:

If you have better answer, please add a comment about this, thank you!

file vue-component vue.js vuejs2 vuetify.js
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: PyCharm cannot see my newly compiled .pyc see on import

27/03/2023

Resolved: I am facing ERR_HTTP2_PROTOCOL_ERROR on my website

27/03/2023

Resolved: TypeScript does not recognize properties when instantiating interface array

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.