add file upload

This commit is contained in:
bee0005
2016-08-22 09:41:25 +00:00
parent 10c12d39e8
commit cbfa6976c7
13 changed files with 93 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
class VolumnController < ApplicationController
class VolumeController < ApplicationController
def info
@volumes = Array.new
volume = Hash.new
@@ -27,4 +27,10 @@ class VolumnController < ApplicationController
return `sshpass -pakfm77 ssh -p 2222 root@124.63.216.174 gluster volume info`
end
def file_upload
file_name = params[:file]
uploader = AvatarUploader.new
uploader.store!(file_name)
redirect_to '/volume/info'
end
end