HMTL
[size=large][color=red]<g:form action="save" method="post" enctype="multipart/form-data" > [/color][/size]
[size=large]<input type="file" id="projectLogoPath" name="projectLogoPath" value="${fieldValue(bean:projectInstance,field:'projectLogoPath')}"/> [/size]
[size=xx-large][color=red]controller:[/color][/size]
[size=x-large][color=olive]
def f = request.getFile('projectLogoPath')
if(!f.empty) {
fileName=f.getOriginalFilename()
filePath="web-app/images/"
f.transferTo(new File(filePath+fileName) )
}
[/color][/size]
[size=large][color=red]<g:form action="save" method="post" enctype="multipart/form-data" > [/color][/size]
[size=large]<input type="file" id="projectLogoPath" name="projectLogoPath" value="${fieldValue(bean:projectInstance,field:'projectLogoPath')}"/> [/size]
[size=xx-large][color=red]controller:[/color][/size]
[size=x-large][color=olive]
def f = request.getFile('projectLogoPath')
if(!f.empty) {
fileName=f.getOriginalFilename()
filePath="web-app/images/"
f.transferTo(new File(filePath+fileName) )
}
[/color][/size]