views:

175

answers:

2

I am in the training of web developement.I want make a page which shows all the files in the D://downloads directory.I made that part in grails.If i click on the particular file i want download that file.I dont know how to make that part.I did a google search.But i cannot do that.

My code is

 <g:each in="${fileList}" var="filename" status="i">
    ${filename}
   <!-- Codes to make a file downloadable-->
  </g:each>
+2  A: 

You just need to set the right headers so that the browser knows its a file that it needs to download. I'm not sure how to do that in grails. http://support.microsoft.com/kb/260519

Luca Matteis
+3  A: 

This will help

BlackPanther