
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Ruby library to provide server side functionality for elFinder. elFinder is an open-source file manager for web, written in JavaScript using jQuery UI.
8 months ago I said: FYI, I'm working on a pure 2.x API implementation. Nothing to release yet, and the holidays are in the way, but wanted to "get the word out."
Today: No update :/
The gem, by default, relies upon the 'image_size' ruby gem and ImageMagick's 'mogrify' and 'convert' commands. These requirements can be changed by implementing custom methods for determining image size and resizing of an image.
NOTE: There is another ruby gem 'imagesize' that also defines the class ImageSize and requires 'image_size' If you have that one installed, elfinder will fail. Make sure you only have 'image_size' installed if you use the defaults.
gem 'el_finder'
to Gemfile skip_before_filter :verify_authenticity_token, :only => ['elfinder']
def elfinder
h, r = ElFinder::Connector.new(
:root => File.join(Rails.public_path, 'system', 'elfinder'),
:url => '/system/elfinder',
:perms => {
/^(Welcome|README)$/ => {:read => true, :write => false, :rm => false},
'.' => {:read => true, :write => false, :rm => false}, # '.' is the proper way to specify the home/root directory.
/^test$/ => {:read => true, :write => true, :rm => false},
'logo.png' => {:read => true},
/\.png$/ => {:read => false} # This will cause 'logo.png' to be unreadable.
# Permissions err on the safe side. Once false, always false.
},
:extractors => {
'application/zip' => ['unzip', '-qq', '-o'], # Each argument will be shellescaped (also true for archivers)
'application/x-gzip' => ['tar', '-xzf'],
},
:archivers => {
'application/zip' => ['.zip', 'zip', '-qr9'], # Note first argument is archive extension
'application/x-gzip' => ['.tgz', 'tar', '-czf'],
},
).run(params)
headers.merge!(h)
render (r.empty? ? {:nothing => true} : {:text => r.to_json}), :layout => false
end
require 'el_finder/action'
class MyController < ApplicationController
include ElFinder::Action
el_finder(:action_name) do
{
:root => File.join(Rails.public_path, 'system', 'elfinder'),
:url => '/system/elfinder',
:perms => {
/^(Welcome|README)$/ => {:read => true, :write => false, :rm => false},
'.' => {:read => true, :write => false, :rm => false}, # '.' is the proper way to specify the home/root directory.
/^test$/ => {:read => true, :write => true, :rm => false},
'logo.png' => {:read => true},
/\.png$/ => {:read => false} # This will cause 'logo.png' to be unreadable.
# Permissions err on the safe side. Once false, always false.
},
:extractors => {
'application/zip' => ['unzip', '-qq', '-o'], # Each argument will be shellescaped (also true for archivers)
'application/x-gzip' => ['tar', '-xzf'],
},
:archivers => {
'application/zip' => ['.zip', 'zip', '-qr9'], # Note first argument is archive extension
'application/x-gzip' => ['.tgz', 'tar', '-czf'],
},
}
end
end
match 'elfinder' => 'home#elfinder'
<%= stylesheet_link_tag 'jquery-ui/base/jquery.ui.all', 'elfinder' %>
<%= javascript_include_tag :defaults, 'elfinder/elfinder.min' %>
<%= javascript_tag do %>
$().ready(function() {
$('#elfinder').elfinder({
url: '/elfinder',
lang: 'en'
})
})
<% end %>
<div id='elfinder'></div>
@gudata added a configuration option to not load child directories. This breaks V1, but if you are using V2
it should work and speed up the responsiveness quite a bit. To enable it set :tree_sub_folders
to false
.
(The MIT License)
Copyright (c) 2010 Philip Hallstrom
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
We found that el_finder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.