php - Uploading images via browser form or JSON request -


in app have been working on time , getting close completion, can create record either via form or via json per normal in laravel.

one thing though, while laravel takes both requests not seem when images brought equation.

i have validation rule in formrequest follows:

'record_image'        => 'image|max:500' 

this works fine , enforces maximum image file upload of 500kb when used in browser form.

however if pass image base64 encoded in json request, fails, presumably because string rather image.

i have checked documentation cannot seem see specific reference laravel handling file uploads in both browser , json.

is there elegant/eloquent(pun intended) way laravel handles missing.

thanks, barry.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -