Santosh Anantharamaiah Santosh Anantharamaiah - 2 years ago 92
jQuery Question

Option for removing the uploaded files displayed using <g:downloadfile> tag

I have used

tag to display the list of uploaded files. Which will display the uploaded files as the list of downloadable links.

But I have a problem here, I am unable to provide the user, delete option if he/she wish to delete any uploaded file.

<g:downloadFiles fileList="${fileList}" />

I think there should be some way out for this using jQuery or javaScript.

Thanks in advance for the help.

Answer Source

Below is the solution which I have written for my question:


<g:each in="${fileList}" var="file">
    <div class="remove">
        <a href="#">
            <span class="glyphicon glyphicon-remove"></span></a>
        <a href="/forms/landing/attachment/${file.attachmentId}" filename="${}">${}</a>


    $('.glyphicon-remove').click ( function(e){
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download