<p>Change the javascript of the <a href="https://github.com/Hambrook/AssetLinks/blob/master/resources/js/assetlinks.js" rel="nofollow noreferrer">asset</a> file to something like this and it will work</p>

<pre><code>$(function(){
    $(".field .input .elementselect .element:not(.linked)").each(function(){
        var $this = $(this);
        if (!$this.data("url")) { return false; }
        var $a = $("&lt;a class='icon'&gt; &lt;/a&gt;")
            .attr("href", $this.data("url"))
            .attr("title", "Download")
            .addClass("download")
            .addClass("sharebtn")
            .addClass("icon")
            .attr('download', $this.data('label'))
            .appendTo($this);
        $this
            .addClass("linked")
            .prepend($a);
    })
});
</code></pre>

CC BY-SA 3.0
2018-03-06T16:35:54.190Z
Amazing! Thank you!
Sebastian
CC BY-SA 3.0
2018-03-06T16:15:39.590Z
2018-03-06T16:15:39.590Z
Robin Schambach
<p>I´m using for the first time Guest Entries plugin to collect some info and some files from users, great! All it´s going great, the site admin will see all the info that the clients sends and the files from each one, but i would like to know if there is a way to download the assets from a specific entry, so keep it simple to download the assets sended by some specific user.</p>

<p><a href="https://i.sstatic.net/zgQWd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zgQWd.png" alt="enter image description here"></a></p>

<p>Something like this plugin does, but it doesn´t work.
<a href="https://github.com/Hambrook/AssetLinks" rel="nofollow noreferrer">https://github.com/Hambrook/AssetLinks</a></p>

<p>I found this one too, but it downloads the assets of a entire source.
<a href="https://github.com/mattstauffer/craftcms-DownloadAssets" rel="nofollow noreferrer">https://github.com/mattstauffer/craftcms-DownloadAssets</a></p>

<p>Any help? Thanks!</p>

<craft-features>
Download files in Assets fields
# Download files in Assets fields

(Asked by: username_0 on 2018-03-06)

I´m using for the first time Guest Entries plugin to collect some info and some files from users, great! All it´s going great, the site admin will see all the info that the clients sends and the files from each one, but i would like to know if there is a way to download the assets from a specific entry, so keep it simple to download the assets sended by some specific user.

[![enter image description here](https://i.sstatic.net/zgQWd.png)](https://i.sstatic.net/zgQWd.png)

Something like this plugin does, but it doesn´t work.
<https://github.com/Hambrook/AssetLinks>

I found this one too, but it downloads the assets of a entire source.
<https://github.com/mattstauffer/craftcms-DownloadAssets>

Any help? Thanks!

**Tags:** craft-features

---

## 1 answers

### Answer by username_1 on 2018-03-06. Score: 1 | Accepted answer

Change the javascript of the asset file to something like this and it will work
$(function(){
    $(".field .input .elementselect .element:not(.linked)").each(function(){
        var $this = $(this);
        if (!$this.data("url")) { return false; }
        var $a = $(" ")
            .attr("href", $this.data("url"))
            .attr("title", "Download")
            .addClass("download")
            .addClass("sharebtn")
            .addClass("icon")
            .attr('download', $this.data('label'))
            .appendTo($this);
        $this
            .addClass("linked")
            .prepend($a);
    })
});

> **Comments:**
> **username_0**: Amazing! Thank you!  

---

