Problema com grails

0 respostas
G

Olá Pessoal estou tendo um problema com grails sera q alguem pode me ajudar
estou fazendo um upload de uma imagem
fiz a view ja consigo carregar a imagem quero saber como faço para mostrar a imagem

Controller

class UserController {

   def upload = {
        render(view:'select_avatar')


//AQUI PRESCISO COLOCAR PARA MOSTRAR A IMAGEM NA TELA
//ESTOU TENDANDO ASSIM MAIS NAO DA CERTO

def f = request.getFile('file')

}
}

view

<g:form action="upload" method="post" enctype="multipart/form-data">
       <input type="file" name="file" id="file" />
   
    <input type="submit" class="buttons" value="Upload" />
  </g:form>

Obrigado!

Criado 4 de março de 2009
Respostas 0
Participantes 1