D
D
Daksin2022-02-01 17:09:49
JavaScript
Daksin, 2022-02-01 17:09:49

How can I get a buffer from an image at the front?

I need to get data from the input in this form:
61f93eae65e5d632715598.png
I'm trying through event.target.files[0] gives out not what I need ( 61f93ef33da7a734378413.png)
I hope for your help.
Application written in vue(nuxt2)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander, 2022-02-01
@Daksin

Why not google ?

V
Vladimir Korotenko, 2022-02-01
@firedragon

You will understand the encoding, I think
https://jsfiddle.net/vkorotenko/kv0ncjh2/1/

G
GrayHorse, 2022-02-01
@GrayHorse

So just call a method arrayBufferon that object.
Everything. is an object of class , which in turn inherits from class .
event.target.files[0]FileBlob

V
Vladimir, 2022-02-01
@Casufi

To show a preview of an image before you upload it to the server, use
https://developer.mozilla.org/en-US/docs/Web/API/F...
Here in this method there is even an example
https://developer. mozilla.org/en-US/docs/Web/API/F...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question