0

Hi I am new to laravel and angularjs. My doubt is how to send uploaded image(convert base64) to laravel

My html code look like below

<input type="file" class="upload upload-button" fileinput="fileinput"
       filepreview="image" file-model = "myFile">

Give some Idea because i want store blob(image) in database.

georgeawg
  • 47,985
  • 13
  • 70
  • 91
Manimaran
  • 383
  • 2
  • 6
  • 19

1 Answers1

0
 $image_parts = explode(";base64,", $request->input('profile_pic')); $image_base64 = base64_decode($image_parts[1]);


 Storage::put('user_profile/croped/' . myimage.jpg, (string) $image_base64, 'public');
Sachin Aghera
  • 466
  • 3
  • 8