首先要把FORM加上
<g:form action="save" method="post" enctype="multipart/form-data" >
<input type="file" id="projectLogoPath" name="projectLogoPath" value="${fieldValue(bean:projectInstance,field:'projectLogoPath')}"/>
在controller里
def f = request.getFile('projectLogoPath')
if(!f.empty) {
fileName=f.getOriginalFilename()
filePath="web-app/images/"
f.transferTo(new File(filePath+fileName) )
}