elFinder issue with CodeIgniter

Added by Marek Karwowski 7 months ago

I am trying to run elFinder from CodeIgniter with HMVC extension enabled.
I can not make it happened because of invalid http request to the connector.

Http request looks like:
http://local.promosquare.com/file_manager/connector/cmd=open&target=&init=true&tree=true&_=1319735617293

Key here is using smart urls against standard GET request? Is there any way I can configure how elFinder can send connector request?
It will be very useful if I can use connector as a CI standard method on controller.

1. If possible how can I configure elFinder to call for something like this:
http://local.promosquare.com/file_manager/connector/cmd/open/target/init/true/tree/true/1319735617293

2. Other solution I can think of is sending all this variables using POST method. Is it possible?


Replies (7)

RE: elFinder issue with CodeIgniter - Added by Troex Nevelin 7 months ago

1. No, not for now and is not planned for future

2. In elFinder 2.x we have client option requestType : 'get'

In 1.x you will have to modify source https://github.com/Studio-42/elFinder/blob/1.x/src/js/elFinder.js#L174 just change GET to POST, it's not well tested but should work with no problem. Maybe some tweaks in connector is needed

RE: elFinder issue with CodeIgniter - Added by Alexander Lingris 6 months ago

I think you can fix your problem by expanding valid url characters in your config file

RE: elFinder issue with CodeIgniter - Added by Troex Nevelin 6 months ago

I'm not sure that I understand why it is needed and how to implement and test it, but patches are welcome on github

RE: elFinder issue with CodeIgniter - Added by Alexander Lingris 6 months ago

If you are referring to me. I meant that he needs to expand the codeigniter's config file.

If I understood correctly his problem.

from:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

to:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-&=';

RE: elFinder issue with CodeIgniter - Added by Troex Nevelin 6 months ago

So CodeIgniter does not allow &= chars in url by default? Does it work thought global rewrite rules?

RE: elFinder issue with CodeIgniter - Added by khoiri uswanto 6 months ago

It work on me and i'm use HMVC too. You just have to call class elFinder.
This is what I'm doing :

1. Make library elfinder in CI. 2. Load the library and call the run function.
  • For me, I'm ignoring lines before line 30 on connector.php.

RE: elFinder issue with CodeIgniter - Added by Alexander Lingris 6 months ago

@ Troex Nevelin
No it doesn't allow by default. But I think that this not the case here. Because in my installation elfinder works without expanding the valid characters.

I wrote a small guide for Codeigniter 2.0.3 and elFinder 2.0 beta (http://lexx.gr/post/codeigniter-203-and-elfinder-2-beta)

(1-7/7)