Hello, couldn't find this anywhere in the issues...

Is it possible to use elFinder to access the Amazon S3 storage instead of the servers public root? For example if I set the image storage to use S3 as the default system.

Would really like to test elFinder in such a scenario to see if it loads S3 faster than IMCE.

Cheers

Comments

ph0enix’s picture

Hi. Currently elFinder don't supporting S3 and there are no plans for this feature in near future. But you can donate S3 driver development to get it available soon.

ph0enix’s picture

Status: Active » Closed (works as designed)
csunny’s picture

Hi. I would like to made a module to support OSS storage(a service like S3). Is it possible to use hooks this module provides? I have checked the elfinder_connector function and it seems it let you hook on elfinder_connector_config. So this is where to make things happen?
Cheers

csunny’s picture

Status: Closed (works as designed) » Active
ph0enix’s picture

Yes, you can use this. See built-in submodules using elfinder hooks.

jslatts’s picture

Issue summary: View changes
StatusFileSize
new26.63 KB

I have S3 integration working with elFinder using the elFinder S3 driver from whs here: https://github.com/whs/elFinder-driver.

It has been modified and integrated to work with the latest master branch of elFinder (not RC1). It depends on the latest version of the AWSSDK and I had to add quite a few S3 configuration values to support the driver.

Not sure if this can/should go into this module, but it may be of use to others.

jslatts’s picture

Status: Active » Needs review
ph0enix’s picture

Title: Amazon S3 files? » Amazon S3 files (patch)
Category: Feature request » Task
Priority: Normal » Major
ph0enix’s picture

Title: Amazon S3 files (patch) » [patch] Amazon S3 files
ph0enix’s picture

Assigned: Unassigned » ph0enix
ph0enix’s picture

@jslatts, this is a great news, thank you!

But unfortunately I have failed to get this work:

Fatal error: Call to a member function getTimestamp() on a non-object in ****/sites/all/modules/elfinder/inc/elfinder.s3.driver.inc on line 75

After replacing that line to:

      "ts" => is_object($dt) ? $dt->getTimestamp() : 0,

I see only Public Files root, no S3 bucket contents. The awssdk2 library installed and loaded. The bucket that I used to test is accessible from desktop S3 browser (used this one http://s3browser.com/).

Probably there are issues with root folder stat generation.

ph0enix’s picture

StatusFileSize
new11.67 KB
ph0enix’s picture

Assigned: ph0enix » Unassigned
Status: Needs review » Needs work
jslatts’s picture

Couple of thoughts:

1. Make sure the directory you specified exists in the bucket (images)
2. Remove the leading and trailing slashes on the directory.

mcrittenden’s picture

StatusFileSize
new26.72 KB

Updated patch with a tiny fix for creating directories.

mcrittenden’s picture

StatusFileSize
new26.72 KB

Previous patch was malformed, here's a 2nd attempt.

mcrittenden’s picture

StatusFileSize
new27.41 KB

Here's another update that drastically improves performance when loading a directory, like on initial load, because it fetches metadata about all files in batch instead of 1 by 1 by 1.

mcrittenden’s picture

StatusFileSize
new27.47 KB

Update to #17 which fixes a couple PHP 5.5 warnings.

mcrittenden’s picture

StatusFileSize
new26.95 KB

New patch attached which makes directory loading much quicker by avoiding the per-file call to fetch its metadata.

jpoirierpinto’s picture

StatusFileSize
new26.89 KB

Here's a version that uses HTTPS.

mcrittenden’s picture

StatusFileSize
new26.95 KB

Seems like the patch in #20 had a whitespace change that is causing the patch to fail to apply for some reason. Here's another attempt at that one.

nwom’s picture

Category: Task » Feature request
Priority: Major » Normal
Status: Needs work » Needs review
sksshed’s picture

I may be being dumb, but I'm unable to get this patch to work. The patch applied successfully and I see the driver options but whatever I select or fill in, when ever I browse to https://mysite.com/elfinder I receive the error "Invalid backend response. Error occurred on the server side. HTTP error 500" There are no errors in "recent log messages". Our S3 bucket is in EU-west-1 and is encrypted, not sure if this makes a difference. Receive the same error for local file system too. Any help appreciated.

ph0enix’s picture

Status: Needs review » Closed (duplicate)

Moved #31