Multiple File Upload in Grails

后端 未结 2 850
后悔当初
后悔当初 2020-12-30 11:18

I\'m trying to integrate the excellent jquery-file-upload from blueimp into Grails 2.0 and to write a new plugin for that. I know there is already a plugin, but it doesn\'t

2条回答
  •  一个人的身影
    2020-12-30 11:39

    request.getFileNames returns an array - you can iterate over this array to obtain all the files. The example is already there on the plugin description.

    def all = request.getFileNames()
    all.each {name ->
       def file = request.getFile(name)
    }
    

    This should give you all the files that were uploaded.

提交回复
热议问题