Open aryalsan opened 7 years ago
Hi @aryalsan,
I'm so sorry for the delay in my reply. I've got this project out of maintenance and I had forgotten. I need to dust off and I will say anything as some as possible.
Regards.
Hi @raulanatol
I think i made the fix for it. Its working now. I don't know if it is the best option. Is it possible to work together on this project. I want to add other modifications.
include ElFinderS3::Action
def elfinder
h, r = ElFinderS3::Connector.new(
:mime_handler => ElFinderS3::MimeType,
:root => '/',
:url => 'CDN_BASE_PATH'
:thumbs => true,
:thumbs_size => 100,
:thumbs_directory => 'thumbs',
:home => t('admin.media.home'),
:original_filename_method => lambda { |file| "#{File.basename(file.original_filename, File.extname(file.original_filename)).parameterize}#{File.extname(file.original_filename)}" },
:default_perms => {:read => true, :write => true, :rm => true, :hidden => false},
:server => {
:bucket_name => 'BUCKET_NAME',
:region => 'AWS_REGION',
:access_key_id => 'ACCESS_KEY_ID',
:secret_access_key => 'SECRET_ACCESS_KEY',
:cdn_base_path => 'CDN_BASE_PATH'
}
).run(params)
headers.merge!(h)
if r.empty?
(render :nothing => true) and return
end
render :json => r, :layout => false
end
Hi @aryalsan!
Sure, please send me a pull request of any change that you want.
Thx! Regards.
I am using Elfinder Rails for Media Manger in my application. I am working on to store the media files to Amazon S3 storage. I try to use the gem el_finder_s3. I created bucket and provided all the configurations like.
Rails application is connect with S3 but elfinder doesn't show the file contents. I checked the bucket, thumb folder was created but elfinder was unable to load the contents.