diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb
index 4af91c1e..e29c2f4c 100644
--- a/app/controllers/dmsf_upload_controller.rb
+++ b/app/controllers/dmsf_upload_controller.rb
@@ -122,6 +122,7 @@ class DmsfUploadController < ApplicationController
if upload
uploaded_file[:disk_filename] = upload.disk_filename
uploaded_file[:tempfile_path] = upload.tempfile_path
+ uploaded_file[:size] = upload.size
end
end
commit_files_internal uploaded_files
diff --git a/app/views/dmsf/_dir_trash.html.erb b/app/views/dmsf/_dir_trash.html.erb
index 563148b1..0d5425a9 100644
--- a/app/views/dmsf/_dir_trash.html.erb
+++ b/app/views/dmsf/_dir_trash.html.erb
@@ -75,7 +75,7 @@
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete),
- :class => 'icon-only icon-delete') %>
+ :class => 'icon-only icon-del') %>
<% else %>
<%= link_to('', delete_dmsf_path(:id => project, :folder_id => subfolder, :commit => 'yes'),
:data => {:confirm => l(:text_are_you_sure)},
diff --git a/app/views/dmsf/_url.html.erb b/app/views/dmsf/_url.html.erb
index d3ff39b0..80d67d4e 100644
--- a/app/views/dmsf/_url.html.erb
+++ b/app/views/dmsf/_url.html.erb
@@ -78,7 +78,7 @@
<% end %>
-
<%= position %> |
- |
-link.updated_at.to_i |
- |
+<%= position %> |
+ |
+link.updated_at.to_i |
+ |
diff --git a/app/views/dmsf/_url_trash.html.erb b/app/views/dmsf/_url_trash.html.erb
index 5d73b077..9ffb09ba 100644
--- a/app/views/dmsf/_url_trash.html.erb
+++ b/app/views/dmsf/_url_trash.html.erb
@@ -64,10 +64,10 @@
<% if @file_delete_allowed %>
<%= link_to_if(@file_delete_allowed, '', dmsf_link_path(:id => link, :commit => 'yes'),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
- :title => l(:title_delete), :class => "icon icon-delete" ) %>
+ :title => l(:title_delete), :class => "icon icon-del" ) %>
<% end %>
-1 |
- |
-link.updated_at.to_i |
- |
+1 |
+ |
+link.updated_at.to_i |
+ |
diff --git a/app/views/dmsf/trash.html.erb b/app/views/dmsf/trash.html.erb
index 93f2c5f2..28991560 100644
--- a/app/views/dmsf/trash.html.erb
+++ b/app/views/dmsf/trash.html.erb
@@ -81,10 +81,10 @@
<% end %>
<% end %>
<%# controls %> |
- <%# position %> |
- <%# size %> |
- <%# updated %> |
- <%# version %> |
+ <%# position %> |
+ <%# size %> |
+ <%# updated %> |
+ <%# version %> |
diff --git a/extra/api/file.xml b/extra/api/file.xml
index f1c19385..eec8bb38 100644
--- a/extra/api/file.xml
+++ b/extra/api/file.xml
@@ -2,7 +2,6 @@
6118
- cat.gif
cat.gif
cat.gif
REST API
diff --git a/test/integration/rest_api/dmsf_file_api_test.rb b/test/integration/rest_api/dmsf_file_api_test.rb
index 45535e91..719e8d2e 100644
--- a/test/integration/rest_api/dmsf_file_api_test.rb
+++ b/test/integration/rest_api/dmsf_file_api_test.rb
@@ -99,7 +99,6 @@ class DmsfFileApiTest < RedmineDmsf::Test::IntegrationTest
- test.txt
test.txt
test.txt
REST API
@@ -109,16 +108,20 @@ class DmsfFileApiTest < RedmineDmsf::Test::IntegrationTest
}
- post "/projects/#{@project1.id}/dmsf/commit.xml?&key=#{token.value}", payload, {"CONTENT_TYPE" => 'application/xml'}
+ assert_difference 'DmsfFileRevision.count', +1 do
+ post "/projects/#{@project1.id}/dmsf/commit.xml?&key=#{token.value}", payload, {"CONTENT_TYPE" => 'application/xml'}
+ end
#
#
#
# 17229
# test.txt
#
- #
+ # #
assert_select 'dmsf_files > file > name', :text => 'test.txt'
assert_response :success
+ revision = DmsfFileRevision.order(:id).last
+ assert revision && revision.size > 0
begin
FileUtils.rm_rf Setting.plugin_redmine_dmsf['dmsf_storage_directory']
rescue Exception => e