jeudi 5 octobre 2017

how to upload base 64 image through java script

    <div class="col-lg-3 col-lg-3">
    <a href='javascript:;'>
<img src="/assets/images/man/img.png" class="" width="100%" height="100vh">
    <button type="button" class="" style="display: none;">Hello</button>
<input type="file" id='img3' style='position:absolute;z-index:2;top:0;left:0;filter: alpha(opacity=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";opacity:0;background-color:transparent;color:transparent;height: 100%;width: 100%;' name="marina_images[]" onchange='readURL(event)'>
    </a>
    <hr>
    </div>

I am useing this code to upload the image but show the error

Uncaught ReferenceError: readURL is not defined
    at HTMLInputElement.onchange(user ruby code)

Aucun commentaire:

Enregistrer un commentaire