Git Product home page Git Product logo

el_finder's People

Contributors

akzhan avatar coorasse avatar dup2 avatar gamecreature avatar gudata avatar johnbintz avatar martinsp avatar p-kolacz avatar phallstrom avatar shenhf avatar troex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

el_finder's Issues

Routing error for some paths

When creating a Folder with a name like "Multimédia" and try to open images inside that folder we get the following error:

No route matches [GET] "/elfinder//Multime%EF%BF%BD%EF%BF%BDdia/

Is there any quick solution for this?

Search/Filter Not Working

I have cloned the example rails app as well as installed this with my own app, and everything seems to be working great except that attempting to search your files returns a "Invalid backend response". Also, after getting the error, the search field no longer accepts keypresses for backspace and arrow keys (although it will still allow you to type letters etc).

Support for elfinder 2.0

Hi Philip,

Thanks for creating such an excellent integration with elfinder - it was a breeze to set up and get running!

I was wondering if you had any plans for evolving this gem to provide support for elfinder 2.0 at some point, or whether your projects are currently using elfinder 1.x only and, as such, you're not looking at doing this.

Either way, thanks again!

Cheers,

Mark.

UTF-8 Filename Support

To support UTF-8 filename, Edit:

gems/el_finder-1.1.0/lib/el_finder/connector.rb

line 21
from: lambda { |file| file.original_filename}
to: lambda { |file| file.original_filename.force_encoding('utf-8')}

Error: Cannot load such file -- image_size

Hi phallstrom,

Thanks for keeping updating this gem. More utf8 support and max upload size rocks. ;)

Just a heads up...After updating today it's not possible to start the application without adding:

gem image_size

to the gemfile.

Maybe it should be some warning in the README.md for that.

Best regards.

Add support for uploading large files (>1GB)

How hard is it to add support for uploading very large files?

I tried to upload a 40GB file and got the following on the webrick backend:
ERROR NoMemoryError: failed to allocate memory

{"error":"Invalid command ''"}

Hello,

First of all, thanks for this gem, really appreciate.

But unfortunatly I have some trouble with installation, even when I'm using cloned example app.
I've got an error in browser when trying to get page with el_finder:

{"error":"Invalid command ''"}

My environment is Ubuntu 10.10, ruby-1.9.2-p290 via rvm, ImageMagick 6.6.2-6 , and a separate gemset for prevent any gem conflicts.

Would be really appreciate for any help.

FTP Connector

Hi !

Is there any way to make this gem works with an FTP ?

Thanks !

Thumbnails not created

Hi phallstromg,

Glad to see that your working in the 2.x API. Really nice!

I've set the thumb variable in the controller to true but when uploading images the Thumbnails are not created. Meanwhile I can see that the .thumbs folder was created without any problem.

I tried the example project and it does the same.

So am I missing some configuration? Checking the connector.rb in the method _upload I cannot see the _tmb method been called (not even by send).

Is this a issue or am i doing something wrong? Can you give me a help on this?

Invalid backend response

I'm trying to implement el_finder using the el_finder GEM. the UI loads up okay and I am seeing what looks to be good JSON data being returned but no files show up and I keep getting the "Invalid backend response".

Here is the JSON that is returned.

{"cwd":{"name":".","hash":"Lg","mime":"directory","rel":"Home","size":0,"date":"2013-05-01 11:45:38 -0400","read":true,"write":false,"rm":false,"hidden":false},"cdc":[{"name":".thumbs","hash":"LnRodW1icw","date":"2013-05-01 11:36:49 -0400","read":true,"write":true,"rm":true,"hidden":false,"size":0,"mime":"directory"},{"name":"logo.png","hash":"bG9nby5wbmc","date":"2012-04-10 10:05:34 -0400","read":false,"write":true,"rm":true,"hidden":false,"size":14681,"mime":"image/png","url":"/system/elfinder/logo.png","resize":true,"dim":"100x96"}],"tree":{"name":"Home","hash":"Lg","dirs":[{"name":".thumbs","hash":"LnRodW1icw","dirs":[],"read":true,"write":true,"rm":true,"hidden":false}],"read":true,"write":false,"rm":false,"hidden":false},"disabled":[],"params":{"dotFiles":true,"uplMaxSize":"50M","archives":["application/zip","application/x-gzip"],"extract":["application/zip","application/x-gzip"],"url":"/system/elfinder"}}

And the controller looks like:

class DocumentLibraryController < ApplicationController
skip_before_filter :verify_authenticity_token, :only => ['elfinder']

def index

end

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

def create
end

def destroy
end
end

I've made sure that public/system/elfinder has full read/write permissions as well.

Anyone have any ideas of what i can try?

I'm running rails 3.2.2 with JQuery 1.7

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Performance problems with 10k directories

We're currently using your Connector with ElFinder (version is 2.1rc1).

When a directory with about 10k subdirectories gets opened, it takes about 15 seconds until the connector returns the response to the client, which I think is a really long time. Do you have any idea how to improve the performance here?

Crop and Rotatate button not visible in image Resize dialog ?

When I run elfinder-2.1.27 front-end with rails as backend, I can't see crop and rotate button in image resize elfinder dialog. When I run php version of elfinder the buttons are seen but when I use elfinder in rails app, same button are not seen. Elfinder version I'm using is 2.1.27 with elfinder gem.

max file size

Hi all ,
I can' t find where to set the max file size upload. Could you help me?
nunzio

Authentication

Does authentication work with the connector? I see it is disabled in the example. This seems to be necessary though for most situations.

Frequent "Invalid backend response. Data is not JSON" error problem ?

folders_controller.rb:

 def root
    h, r = ElFinder::Connector.new(
      :root => File.join(Rails.root, 'companies_folders', "#{current_user.root_folder}"),
      :url => "/companies_folders/#{current_user.root_folder}",
      :perms => {
        'forbidden' => {:read => false, :write => false, :rm => false},
        /README/ => {:write => false},
        /pjkh\.png$/ => {:write => false, :rm => false},
      },
      :extractors => {
        'application/zip' => ['unzip', '-qq', '-o'],
        'application/x-gzip' => ['tar', '-xzf'],
      },
      :archivers => {
        'application/zip' => ['.zip', 'zip', '-qr9'],
        'application/x-gzip' => ['.tgz', 'tar', '-czf'],
      },
      :thumbs => true
    ).run(params)

    headers.merge!(h)
    render (r.empty? ? {:nothing => true} : {:text => r.to_json}), :layout => false
  end

routes.rb

  get 'elfinder', to: 'folders#root'
  put 'elfinder', to: 'folders#root'
  patch 'elfinder', to: 'folders#root'
  delete 'elfinder', to: 'folders#root'
  post 'elfinder', to: 'folders#root'

CSS and js are properly configured, I think.
screenshot from 2017-07-23 23-03-20

application.js

$(function() {
  //var rails_csrf = {};
  //rails_csrf[$('meta[name=csrf-param]').attr('content')] = $('meta[name=csrf-token]').attr('content');

  $('#elfinder').elfinder({
    lang: 'en',
    height: '500',
    driver: 'LocalFileSystem',
    url: '/elfinder'
    // transport : new elFinderSupportVer1(),
    // customData: rails_csrf,
  });
});

and the root.html.erb is as:-

<div class="row">
  <div class="col-md-12">
    <div id='elfinder'></div>
  </div>
</div>

I'm frequently getting "Invalid backend response.
Data is not JSON." error, I tried changing url, path for connector class hard coded. The example apps works for rails 3.2.* with ruby 1.9.3, but my config is rails 5.1.2, ruby 2.4.0(bundle install succeeds with el_finder version 1.1.0). Any Idea ! on getting to solve this problem or Is there a way to make this gem compatible with rails 5.1.2 and ruby 2.4.0. Thankyou.

Multiple Roots

I'm trying to mount multiple roots, but seems like I can mount only the one. How can I access to this feature?

rails 4 compability

Hi.
Thank you for your gem. I've been using it for a long time in my projects, but I started using rails 4 and I had a problem with file uploading.
I got such kind of error "ActionController::InvalidAuthenticityToken"
Can you help me with this problem?

Bug fix

gems/el_finder-1.1.0/lib/el_finder/connector.rb

line 243

FileUtils.mv(file.path, dst.fullpath)

should be:

FileUtils.mv(file.tempfile.path, dst.fullpath)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.