From 4c6acc8702eec082a8c0f5920151b2177a76d740 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 21 Nov 2012 19:54:53 +0600 Subject: [PATCH] [file-store-6] change upload url --- bin/file-store.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/file-store.rb b/bin/file-store.rb index 40d04af06..390121568 100755 --- a/bin/file-store.rb +++ b/bin/file-store.rb @@ -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