Jump to content
julienmarie

Module for S3 / Cloudfront

Recommended Posts

Hi,

I'd like to create a module to upload directly every file ( images uploaded, css and js minified by AIOM, etc... ) to S3 so it can then be distributed via Cloudfront in a clean way.

How would you proceed to detect these file creation/changes ?

Thanks !

J.

Share this post


Link to post
Share on other sites

This has been asked for/mentioned/requested here a few times. I think all it will take to produce is someone with the money and/or skills to put it together. It'd be me if had either of those two :)

  • Like 2

Share this post


Link to post
Share on other sites

Thanks Marty for the answer.

I guess i just need to find the right hooks for file writing if they do exist then the rest will be doable. I have the time to make it. Of course I'll share it with the community ( I got a few other modules under dev that I will share along the summer ).

J.

  • Like 1

Share this post


Link to post
Share on other sites

@zyON : Awesome! Why using InputfieldFile::fileAdded and not Pagefile::install hook ? I'm thinking about doing a fork, you mind?

j.

Share this post


Link to post
Share on other sites

julienmarie: I think Pagefile:install is not triggered with files added from the admin and that was my major concern. 

Yes, go ahead, fork it and let's create a better module!

  • Like 2

Share this post


Link to post
Share on other sites

ZyON,

Great work on the S3 module.  I really hope your product development goes well.  It is really a great solution for Amazon Elastic Beanstalk users.  Beanstalk has auto-scaling that rebuilds the server instance and can really wreck new files in the assets folder that may have been added in the remote admin console.  

Your module sets up and installs beautifully and I can see the asset files served from the new Cloudfront and S3 repositories by inspecting elements of the assets folder. 

However there may be a slight problem with thumbnails or if PW reduces the image file sizes.  The image file aspect ratio for some of our files is something like 400x0.  I am not sure what this means but the images do not appear and has a broken image icon.  I have researched other PW forums about images not uploading or deleting and came across the $config->uploadTmpDir issues in other forums.  Before following all the issues with the uploadTmpDir, I tried uninstalling the S3 module and reinstalling.  I still get the same problem, the files are not outputting correctly from AWS Cloudfront.  

Any ideas you may have is welcomed.  

Thanks again for an awesome module.  

March 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...