#907: set filename of archive

This commit is contained in:
Vokhmin Alexey V 2013-02-14 17:35:10 +04:00
parent a03eb0b1fc
commit 9b483d0ec2
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ class Project < ActiveRecord::Base
sha1 = Digest::SHA1.file(archive[:path]).hexdigest
token = User.find_by_uname('rosa_system').authentication_token
if %x[ curl #{APP_CONFIG['file_store_url']}/api/v1/file_stores.json?hash=#{sha1} ] == '[]'
system "curl --user #{token}: -POST -F 'file_store[file]=@#{archive[:path]}' #{APP_CONFIG['file_store_url']}/api/v1/upload?file['name']=#{name}-#{tag.name}.#{tag_file_format(format)}"
system "curl --user #{token}: -POST -F 'file_store[file]=@#{archive[:path]};filename=#{name}-#{tag.name}.#{tag_file_format(format)}' #{APP_CONFIG['file_store_url']}/api/v1/upload"
end
if project_tag
old_sha1 = project_tag.sha1