vue-picture-input
vue-picture-input copied to clipboard
Can I use base64 for prefill ?
My project have service for get image by return base64 ,because don't want direct access by url image.
How to use base64 data for prefill ?
Please give me some example.
Thank you.
Hi,
As explained here : https://stackoverflow.com/questions/47468643/how-to-display-mysql-blob-image-in-html-using-vuejs
You need a function that return the string with the buffer in the right format.
Once you've done that ->:prefill="dataUrl()"
will do the trick 😉
dataUrl() { return this.form.avatar },
Here form.avatar
that i retrieve from the database is already on the format data:image/png;base64,iVBORw0KGgoAAAANS....
Hi,
I have a problem, when I intent to insert the base64 image in the property "prefill" I get the alert with the message this file isn't unsupported file.
thanks
I'm interested in this topic - any news about it?
The format of my file is data:image/jpeg;base64,/9
but I always receive the alert with the message "this file isn't supported file".
Any ideas?
This should be fixed in 3.0.0