========
download
========

.. js:function:: download() 

**domain**: client 

**language**: javascript

**class** :doc:`Field class </refs/client/field_api>`

Description
===========

Call ``download`` for fields of type FILE to download the file.

Example
=======

.. code-block:: js

  function on_view_form_created(item) {
    item.add_view_button('Download').click(function() {
       item.attachment.download(); 
    });
  }
