Skip to content

Update core/components/phpthumbof/model/aws/sdk.class.php #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jonrawlins
Copy link

Fixes Caching issues within an S3 Bucket

Fixes Caching issues within an S3 Bucket
@itskingori
Copy link

I managed to get S3/Cloudfront/phpThumbOf working ... but I noticed the site is slow in loading the images. I think the issue is how to get that whole mix to leverage from browser cache which improves page loads significantly by preventing the browser from fetching an image it might already have.

So right now my browser always fetches all images during all requests ... because cloudFront/S3 will not supply a Cache-Control or Expires header to the browser on my behalf, so i'llneed to set the headers on the object in S3.

Question is, phpThumbOf handles all the upload and there are no setting to manage this behaviour.

Dunno if this makes sense or is worth looking at.

@jonrawlins
Copy link
Author

Are you using the phpthumbof filter in your chunk or output? With the change that I posted, we never had this problem so I am a little confused.

@itskingori
Copy link

Actually ... I've realised that MODx had an AWS sdk integrated to assist with the Media Sources that were recently introduced.

However I also have my own SDK (later version) that's 'require_once' in some of my code so that I can use it ...

Whenever I require_once the aws script I get this Fatal error: Call to a member function processElementTags() on a non-object in /home/waabeh/public_html/core/components/formit/model/formit/fihooks.class.php on line 299

@jpdevries
Copy link
Contributor

I'm working on merging PRs into the new repo at modxcms/phpThumbOf and don't want to overlook this one but need to revisit to review. Let me know if there are any specific tests you think should be done to make sure it is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants