From afbfe491a42577b876b6e617c8acf5a0db12a6b2 Mon Sep 17 00:00:00 2001 From: windheartwen Date: Fri, 26 Sep 2014 11:34:18 +0800 Subject: [PATCH] Update _file.html.erb We have setup a redmine for internal use. At the same time, a proxy is setup too so that external users can enjoy our bug tracking service. If the url is created as a full path, external user can't download the file as it is returning the file of internal server address. Having the relative path generated can make both internal and external parties possible to download the file. --- app/views/dmsf/_file.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/dmsf/_file.html.erb b/app/views/dmsf/_file.html.erb index 3c22b7c2..efddc09b 100644 --- a/app/views/dmsf/_file.html.erb +++ b/app/views/dmsf/_file.html.erb @@ -25,7 +25,7 @@ <%= check_box_tag(name, id, false, :title => l(:title_check_for_zip_download_or_email)) %> - <% file_download_url = url_for({:only_path => false, :controller => :dmsf_files, :action => 'show', :id => file, :download => ''}) %> + <% file_download_url = url_for({:only_path => true, :controller => :dmsf_files, :action => 'show', :id => file, :download => ''}) %> <%= link_to(h(title), file_download_url, :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", @@ -180,4 +180,4 @@ 1 <%= file.last_revision.size %> <%= file.last_revision.updated_at.to_i %> -<%= file.last_revision.iversion %> \ No newline at end of file +<%= file.last_revision.iversion %>