Skip to content
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

Ability to serve images from database or s3? #56

Closed
neilferreira opened this issue Mar 8, 2012 · 10 comments
Closed

Ability to serve images from database or s3? #56

neilferreira opened this issue Mar 8, 2012 · 10 comments

Comments

@neilferreira
Copy link

Hi,

I've got a setup where I cannot rely on user uploaded images being on disk, users upload images and I'm storing the file data and mimetype in the database, resizing them and then passing them along to s3.

Have you considered a similar approach?

Cheers

@lsmith77
Copy link
Contributor

lsmith77 commented Mar 8, 2012

there is no solution for this in the Bundle yet .. but you should be able to implement this using a custom CacheResolver .. if you implement this .. please consider contributing the code back.

@lsmith77
Copy link
Contributor

lsmith77 commented Mar 8, 2012

it might be a solution to simply integrate https://github.com/KnpLabs/Gaufrette

@stof
Copy link
Contributor

stof commented Mar 8, 2012

btw, using the stream wrapper available in Gaufrette, it should be fairly transparent for Imagine: simply configure it to use gaufrette://foo/ as directory for the images

@kriswallsmith
Copy link
Contributor

You should be serving images from CloudFront, not S3, and doing so using a custom origin:

http://aws.typepad.com/aws/2010/11/amazon-cloudfront-support-for-custom-origins.html

Makes the whole thing much simpler.

@neilferreira
Copy link
Author

I've started working on this, I've created a new custom loader to load from the database and will be working on a Gaufrette powered resolver next.

https://github.com/neilferreira/LiipImagineBundle

Cheers.

@lsmith77
Copy link
Contributor

feel free to open a PR even if its not finished in case you want us to give you some feedback already.

@stof
Copy link
Contributor

stof commented Mar 15, 2012

and btw, you don't need to wait for the gaufrette loader to submit the database one. It is even better to keep them in separate PRs to ease review

@neilferreira
Copy link
Author

I've added a pull request #59, but I'm not sure how to reference it here.

@lsmith77
Copy link
Contributor

@neilferreira just write #59 and it will reference it on both ends. thx for the PR .. will check it out today.

@lsmith77
Copy link
Contributor

see #63

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

No branches or pull requests

4 participants