Hi

I have an articles list views, it display perfect on drupalgap.

Now I like to add an download button along with image (example image attached)

Is here any support/document for this?

I also tried with using https://www.drupal.org/project/download_file

CommentFileSizeAuthor
image-download-formatter-example.png15.58 KBshahidbscs

Comments

shahidbscs created an issue. See original summary.

shahidbscs’s picture

For now found a simple solution

<a href="image/file/path" data-ajax='false' download> Download image </a>

1) used data-ajax='false' to avoid Drupalgap redirect
2) download is and html5 element attribute

tyler.frankenstein’s picture

Status: Active » Closed (works as designed)

Thank you for sharing!

ntym’s picture

Just for reference

This will not work in PhoneGap compiled app.
In Android app I used link like:
<a onclick="window.open('file_url', '_system', 'location=yes')" class="ui-btn">Download</a>