Lets share love

How ? copy url of this blog and share in your social network :) simple

Lets share love

How ? copy url of this blog and share in your social network :) simple

Friday, October 7, 2016

Upload multiple files in Grails

in controller

 def files = request.getFiles("userFiles[]")

 for (def file:files ){
//logic for saving file in you storage
}


in GSP

<g:form enctype='multipart/form-data' controller="contacts" action="addEvent" class="form-horizontal" role="form">

<input type='file' name='userFiles[]' multiple />

<input type="submit" class="btn btn-primary" value="Save Event">

</g:form>


If any confusions let me know. Email me at aadityabhatta@gmail.com