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
  • 48,608
  • 13
  • 72
  • 95
Manimaran
  • 405
  • 2
  • 8
  • 20

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
  • 486
  • 3
  • 8