Don't force download
Opened this issue · 8 comments
kroomagnon commented
Hi!
Please don't force downloading of the image when I try to open in new tab.
Regards,
Krisztián
dstana commented
+1
Deleted user commented
+1
Deleted user commented
@dstana looks like simple workaround of this problem is:
diff -Naur app/views/attachments/_links.html.erb-2018-07-04 app/views/attachments/_links.html.erb
--- app/views/attachments/_links.html.erb-2018-07-04 2018-07-04 07:45:40.541549108 +0000
+++ app/views/attachments/_links.html.erb 2018-07-04 07:45:47.139515615 +0000
@@ -11,7 +11,7 @@
<tr>
<td>
<% if attachment.is_image? %>
- <%= link_to_attachment attachment, :class => 'icon icon-attachment lightbox_preview', :download => true -%>
+ <%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => false -%>
</td>
<td class="alignrigth">
<%= link_to l(:button_view),
In any case this is fix of my issue :)
dstana commented
@wwwlde What version of the plugin are you using? That row in my version looks like this:
<tr>
<td>
<%= link_to_attachment attachment, class: 'icon icon-attachment' -%>
<span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
<%= link_to_attachment attachment, class: 'icon-only icon-download', title: l(:button_download), download: true -%>
</td>
<td><%= attachment.description unless attachment.description.blank? %></td>
<td>
<% if options[:author] %>
<span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span>
<% end %>
</td>
<td>
<% if options[:deletable] %>
<%= link_to l(:button_delete), attachment_path(attachment),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => 'delete icon-only icon-del',
:title => l(:button_delete) %>
<% end %>
</td>
</tr>
Deleted user commented
@dstana Version 0.4.3 / Redmine 3.4
dstana commented
@wwwlde I'm confused. The diff shows you only changed 1 line. Can you post the the rest of the contents _links.html.erb?
Deleted user commented