Skip to content

Instantly share code, notes, and snippets.

@chartjes
Created December 4, 2017 15:47
Show Gist options
  • Save chartjes/d2a09f35bddbcab124ffc677b90f526b to your computer and use it in GitHub Desktop.
Save chartjes/d2a09f35bddbcab124ffc677b90f526b to your computer and use it in GitHub Desktop.
Question about Flysystem
In OpenCFP we store the generated name of speaker images that people upload
and then assume the path is always '/uploads/<name of file>'
I have plans to want to allow OpenCFP to be deployed on Heroku where we could
not write image files to the filesystem. I have already played around with
Flysystem and have it writing files locally but I want to add the ability to
have those files exist on S3 and the app find them.
Is there a method where I can ask an adapter "what is your path" and then
prepend that to the image name we're storing in the database.
So I could do something like:
<img src="<value for path>/<name of image in database>">
Am I better off serializing indivdual Flysystem objects and storing them
in the database instead?
@chartjes
Copy link
Author

chartjes commented Dec 4, 2017

Thanks for the clarification Frank!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment