Sabbir345's avatar

Image uploading without submit in laravel

Here is my code

// HTML

< div class="element" > < i class="fa fa-camera"> < input type="file" name="image" id="profile_pic" > /div>

// JS

$("i").click(function () { $("input[type='file']").trigger('click'); });

$('input[type="file"]').change(function () { if ($(this).val() != '') { console.log(this); } });

How can i find image path. please help me

0 likes
1 reply

Please or to participate in this conversation.