whs-junkyard / elFinder-driver

*unmaintained* Drivers for elFinder
11 stars 5 forks source link

Is it working? #3

Closed ysagon closed 10 years ago

ysagon commented 10 years ago

I've just downloaded your s3 driver and tried it with elfinder-2.0-rc1. No luck.

This is how I instanciate the connector:

$opts = array(
   'debug' => true,
   'roots' => array(
      array(
         'driver'        => 'S3',   // driver for accessing file system (REQUIRED)
         "s3" => array(
            "key" => "mykey",
            "secret" => "mysecret",
            "region" => "eu-west-1"
         ),
         "bucket" => "mybucket",
         "acl" => "private",
      )
   )
);
// run elFinder
$connector = new elFinderConnector(new elFinder($opts));
$connector->run();

This what I receive from the connector using firebug:

{"error":["errConf","errNoVolumes"],"debug":["Driver \"elFinderVolumeS3\" : "]}

I have added an error_log("toto"); in the init function in elFinderVolumS3.class.php but it seems that this function is never called.

whs commented 10 years ago

Have you created the bucket?

Also, in issue #2 seems that I forgot to put a path and url in the example config. (Sorry for not fixing it yet :/) You need to add this to your configuration. Also, the path must point to a subdirectory in your bucket, not the root.

On Oct 2, 2556 BE, at 9:57 PM, Sagon notifications@github.com wrote:

I've just downloaded your s3 driver and tried it with elfinder-2.0-rc1. No luck.

This is how I instanciate the connector:

$opts = array( 'debug' => true, 'roots' => array( array( 'driver' => 'S3', // driver for accessing file system (REQUIRED) "s3" => array( "key" => "mykey", "secret" => "mysecret", "region" => "eu-west-1" ), "bucket" => "mybucket", "acl" => "private", ) ) ); // run elFinder $connector = new elFinderConnector(new elFinder($opts)); $connector->run(); This what I receive from the connector using firebug:

{"error":["errConf","errNoVolumes"],"debug":["Driver \"elFinderVolumeS3\" : "]} I have added an error_log("toto"); in the init function in elFinderVolumS3.class.php but it seems that this function is never called.

— Reply to this email directly or view it on GitHub.

ysagon commented 10 years ago

Ah thanks for the quick answer! And sorry for not having saw the previous issues. That's exactly that, it was missing the path. The url seems "optional"? Anyway it's working like that. As I have a custom script to allow a user to read files on amazon, I will probably try with url one day. I have another issue, I'll open a new one.