-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Replace mimemagic with marcel #54
Conversation
NOTE: This was our commit message, which shows how simple it is to upgrade for MacOS and Linux users:
|
If this repo is sticking with |
Sadly for people using containerized builds or cloudfoundry systems, adding another system dependency can be a real pain in the butt, especially for larger organizations with lots of red tape trying to maintain legacy software |
Would it be possible / reasonable to make it user choice on which library to use? Mostly just wondering academically, as for my personal use case it doesn't much matter, but I know there are implementations that utilize the underlying mime library as a first-class dependency, and would require much work to switch, if it became necessary. Granted it's likely not necessary for most, as both can sit side-by-side... but for a workflow on top of kt-paperclip that reaches back down to the mime library, it could theoretically be painful. I know, super edge case... I'll disappear again. Cheers! Thanks for keeping paperclip alive! We need it :) |
I would be open to it. Out of curiosity, are you using this gem with Rails or independently? Rails just made the same transition https://weblog.rubyonrails.org/2021/3/26/marcel-upgrade-releases/ |
Our use case is a legacy Grape (not Rails) app that does load some of the Rails gems, like ActiveRecord, ActiveSupport and ActionMailer (@ v5.2). Also sorry for ninja edits... |
Gotcha. I think it would be possible, but would rather just keep a single dependency in this PR to keep it simple. Could you please test your app against the PR as it sits now? If it causes issues I can fix them before it's merged :) |
Yep, I will test it soon. |
Are there any updates on getting this merged? This is the last blocker for my team to release a fix for all this. |
@EthanZeigler Have you tested this branch in your app to see if it works? They were waiting on feedback from an integrated environment. I was planning to test it yesterday but had to manage a different hotfix. |
@ghiculescu is the build failure concerning? |
I'll be able to get my team to test it tomorrow. |
It was the same failure on master, so I don't think this PR is causing it. But 5305f6d should fix it. Edit: it improved things but there's still some failures, which don't seem related to this PR. |
I've added a list of known breaking changes we came across while testing this internally. Please let me know if there's others to add to the PR + changelog. |
@ghiculescu thanks for opening this PR and for beginning the list of potentially breaking changes. FWIW, office documents were broken using the |
we're also eager to have this merged~ |
Thanks @rocket-turtle - I added it to the PR body. |
Our CI passed. Tested in a production environment, and all 5 of our uses for Paperclip seem to keep working fine 👌 Adding the dependency to |
rails/marcel#36 was merged yesterday. Be on the lookout for a version bump. |
Passes CI for us (not tested in production though) saving image files and .xlsx (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) files to a bucket on S3, on Rails 6.1.3.1. Many thanks for the work! |
Great. @rocket-turtle wanna see if this fixes your issues? |
At TableCheck we have also used this branch for several days with no issues processing 1,000+ uploads in various formats each day. Looks like Marcel 1.0.1 is now out. How can we get this PR merged and released? |
@ghiculescu looks good. |
I've also been using this in an application handling various filetypes and haven't come across any issues. |
Guys lets get this one to the finish line... 🏁 |
eagerly waiting for the merge ⏳ |
@ssinghi can you handle this merge? It's a critical one. I've been running this in production now for over 3 weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can bump this to 1.0.1 now
Co-authored-by: Di Wu <3957339+CaptainAwesomeDi@users.noreply.github.com>
Eager to have this merged |
Running this on production (Rails 6.1.3.1) for several weeks now without issues. Mainly handling sound files with substantial file reprocessing. Thanks for your commitment 👍 |
Also running this in production (on multiple Rails services, from |
@adrianmann please merge this |
@johnnyshields Merge what? I don't have privileges to merge anything anyways. |
@ssinghi ? |
Will someone be merging this? This is a pretty important update. |
Bumping this for anyone who missed it. We have been running this branch in production for a few months, it's 👍 . I think the test failures are intermittent. |
We have been running with no issues since April 4, 2021. - https://buildingenergyscore.energy.gov |
Same here, zero issues since early April 2021. |
Thank you for this PR, we'll get it reviewed soon and work on it. |
Resolves #53
See also rails/marcel#30, https://weblog.rubyonrails.org/2021/3/26/marcel-upgrade-releases/, carrierwaveuploader/carrierwave#2551
Known breaking changes
validates_attachment :foo, content_type: { content_type: ["application/vnd.ms-excel"] }
may need to be changed tovalidates_attachment :foo, content_type: { content_type: ["application/vnd.ms-excel", "application/x-tika-msoffice"] }
.marcel
which includes Magic for xlsx rails/marcel#36