php - upload multiple images using symfony -


i'd upload lot of photos htmlto symfony server. don't know why doesn't work.

<form method="post" action="/api/photographer/photos/up">     <span class="btn btn-default btn-file">         selecciona tus fotos          <input id="photos" idenctype="multipart/form-data" type="file" name="photos[]" multiple="multiple" >     </span>      <button id="uploader" class="btn btn-primary" type="submit">         <i class="fa fa-cloud-upload"></i>          s&uacute;belas al servidor     </button> </form> 

symfony:

function upphotosaction(request $request){     $photos = $request->files->get('photos');     var_dump($photos);     return "ok"; } 

does know what's wrong?

add enctype="multipart/form-data" form attribute:

<form method="post" action="/api/photographer/photos/up" enctype="multipart/form-data"> 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -