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

Image upload enhancements #509

Closed
p-decoraid opened this issue Oct 11, 2016 · 7 comments
Closed

Image upload enhancements #509

p-decoraid opened this issue Oct 11, 2016 · 7 comments

Comments

@p-decoraid
Copy link

Posting this to get feedback/suggestions etc.

We are looking to improve the process of uploading images for various posts, specifically:

  • Have a default s3 prefix per post type, so that each post type has its respective images in its own subfolder
  • We use another level of subfolders below post type to group images pertaining to a single post; as such we want the system to remember the last folder the user was in, per post type, so that multiple images can be uploaded to the final subfolder without having to navigate there every image. This cache should expire after some time, I'm thinking 6 hours.
@mazharoddin
Copy link
Contributor

yes, this will be helpful.. recently Owen implemented subdomains having specific folders for each site, so this would be nice addition to that.

@p-decoraid
Copy link
Author

@mazharoddin thanks, can you point me toward that code? I looked through first few pages of commits here and did not see anything appropriate.

@mazharoddin
Copy link
Contributor

@p-decoraid , here is the code snippet which @owen2345 modified to add support folder per subdomain.
https://github.com/owen2345/camaleon-cms/blob/master/app/uploaders/camaleon_cms_aws_uploader.rb#L23

@p-decoraid
Copy link
Author

Thanks @mazharoddin !

@brian-kephart
Copy link
Collaborator

I would like this to be an optional feature. The reason is that I have an image compressor hooked up to my S3 bucket that places all optimized images in the same directory. If the function draws files from various subfolders but places them all in one place, then my file management has actually gotten worse.

Another upload feature that would solve this problem would be to add a hook for custom upload processing - image optimization, antivirus, etc. With this in place I could optimize my images before they reach the subfolders, removing the conflict.

@owen2345
Copy link
Owner

@briank-musichouse
there is a hook for uploader called "before_upload" where you can do it.
Regards,

@brian-kephart
Copy link
Collaborator

Sorry, I must have overlooked that. Thanks!

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

5 participants