vue-picture-input icon indicating copy to clipboard operation
vue-picture-input copied to clipboard

Can I use base64 for prefill ?

Open Juckky00 opened this issue 6 years ago • 3 comments

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.

Juckky00 avatar Oct 03 '18 18:10 Juckky00

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....

sebpalluel avatar Oct 10 '18 19:10 sebpalluel

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

nausech avatar Nov 21 '19 23:11 nausech

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?

valeriopisapia avatar Jan 12 '21 16:01 valeriopisapia

This should be fixed in 3.0.0

alessiomaffeis avatar Jul 20 '23 20:07 alessiomaffeis