Hi!
We are looking into using the Filemanager (http://webix.com/filemanager/index.html) with Rails. So I’m wondering if there are someone with experience making a Rails connector for the Filemanager?
Anything that can help us getting started would be great
Hi! I am using it with rails, it i working ok, the only problem is with uploads, a could not figure out when the upload completes. I basically created a controller with all the needed actions, and call these actions by configuring then in the options of the filemanager:
file_manger.js.coffee
class FileManager
constructor: (@element) ->
@token = @element.data('token')
@type = @element.data('type')
@usermail = @element.data('usermail')
webix.ready(@render)
options: () ->
view: 'filemanager'
left: 100
id: 'files'
container: @element.attr('id')
handlers:
branch: @actionUrl('load_folder')
search: @actionUrl('search')
upload: @actionUrl('upload')
download: @actionUrl('download')
copy: @actionUrl('copy')
move: @actionUrl('move')
remove: @actionUrl('remove')
rename: @actionUrl('rename')
create: @actionUrl('create')
url: '/file_manager/load_root_folders'
actionUrl: (action) ->
"/file_manager/" + action + "?authenticity_token=" + encodeURIComponent(@token)
render: () =>
new webix.ui(@options())
files_manager_controller.rb
class FileManagerController < ApplicationController
def home
...
end
def files
...
end
def download
...
end
def copy
...
end
def move
...
end
def remove
...
end
def create
...
end
def rename
...
end
def upload
...
end
def load_root_folders
...
end
def load_folder
...
end
def search
...
end