[file-store-6] change upload url

This commit is contained in:
Alexander Machehin 2012-11-21 19:54:53 +06:00
parent 7af613e707
commit 4c6acc8702
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ Dir.glob("*.{bz2,rar,gz,tar,tbz2,tgz,zip,Z,7z,xz,lzma}").uniq.sort.each do |file
puts " file \"#{file}\" already exists in the file-store"
elsif resp == []
# try to put file at file-store
resp = JSON(rclient.post :file_store => {:file => File.new(file, 'rb')})
resp = JSON `curl --user #{ARGF.argv[0]}: -POST -F "file_store[file]=@#{file}" http://file-store.rosalinux.ru/api/v1/upload`
unless resp['sha1_hash'].nil?
new_sources << " \"#{file}\": #{sha1}"
FileUtils.rm_rf file