I\'m trying to emulate the file upload code from the grails website, and I\'m running into some problems. I\'m using the same code as found here. Here is my code:
Now with the Grails 2.x use:
def upload = { def file = request.getFile('file') assert file instanceof CommonsMultipartFile if(!file.empty){ //do something } else { //do something } }
More clean, more simple.