To download an attachment from a web project through a browser, set the attachment URL to <a href = 'url'> </a>. Then, click the link on the page to download the attachment.
However, in some cases, the browser directly opens the attachment instead of downloading it. set the <mime-mapping> element in XML (SSH project), and disable the browser from automatically opening the attachment format you want to download by default through <mime-mapping>, instead, download it.
<Mime-mapping>
<Extension>RAR</Extension>
<Mime-type> application/RAR</Mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension> doc </extension>
<Mime-type> application/MSWord</Mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension>PDF</Extension>
<Mime-type> application/PDF</Mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension>Zip</Extension>
<Mime-type> application/Zip</Mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension>Txt</Extension>
<Mime-type> application/Txt</Mime-type>
</Mime-mapping>
<Mime-mapping>
<Extension>RAR</Extension>
<Mime-type> application/RAR</Mime-type>
</Mime-mapping>