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

Switch from carrierwave to active storage for avatars and attachements #158

Closed
sojan-official opened this issue Oct 19, 2019 · 15 comments · Fixed by #393
Closed

Switch from carrierwave to active storage for avatars and attachements #158

sojan-official opened this issue Oct 19, 2019 · 15 comments · Fixed by #393
Assignees
Labels
backend Changes related to backend / ruby code hacktoberfest Issues to work during hacktoberfest
Milestone

Comments

@sojan-official
Copy link
Member

  • we use carrierwave aws : this should be changed to active storage for avatars and attachments
@sojan-official sojan-official added backend Changes related to backend / ruby code hacktoberfest Issues to work during hacktoberfest labels Oct 19, 2019
@nursoltan-s
Copy link
Contributor

@sojan-official
Hi, can you assign me to this issue?

@sojan-official
Copy link
Member Author

@nursoltan-s I have assigned the issue, let us know if you need any help.

@sojan-official
Copy link
Member Author

@rojasTob Could you give this a check. if it's not the right fit, will find another one for you.

@rojasTob
Copy link

@rojasTob Could you give this a check. if it's not the right fit, will find another one for you.

@sojan-official I will try to solve it.

@rojasTob
Copy link

@rojasTob Could you give this a check. if it's not the right fit, will find another one for you.

Hi @sojan-official. I have read the documentation of active-storage and have read some articles about the migration from carrierwave to active-storage. So far, after installing active-storage, it creates two new tables 'active_storage_blobs' (will contain the metadata of the file) and 'active_storage_attachments' (will associate the model with the blob). But, what happens with the current columns that store information about the image for example in Contact model the avatar field? Could we need a migration? What do you think? Or do you have a plan to switch to active storage?

@sojan-official
Copy link
Member Author

sojan-official commented Oct 30, 2019

@rojasTob great questions 😄
At this point we don't have to care about backward compatibility. there is no production systems running the software. so we can switch over and call it day.

so basically

  • add active storage
  • remove the existing avatar field
  • port the functionality to the active storage way and make sure it works

with active storage, people who want to run the system would have more options to choose the cloud provider they want with a simple switch of config. + carrierwave I believe would be slowly deprecated, in favor of the built-in solution from rails.

let me know if you have any questions.

@pranavrajs
Copy link
Member

@karthik-sivadas Would you be interested to take a look at this one?

@karthik-sivadas
Copy link
Contributor

@pranavrajs yeah sure. If no one working on this then I will start working on this.

@rojasTob
Copy link

@pranavrajs Hi, I was working on this. Sorry for my late message :(

@sojan-official
Copy link
Member Author

@rojasTob You can continue working on this. Meanwhile, if you need any help feel free to raise a WIP/Draft PR and we will be happy to help.

@rojasTob
Copy link

@sojan-official Thanks!

@sojan-official
Copy link
Member Author

hey, @rojasTob do you have a branch on which you are working? I am working on profile pictures for agents and would like to do it with active storage.

I could build on top of what you have, so we won't have to duplicate the effort.

@rojasTob
Copy link

rojasTob commented Dec 18, 2019

Hi @sojan-official , sorry for my late answer. I was working on a branch, of a fork. These days I have not worked on that, sorry I was sick. I hope to continue this week. I apologize.

@sojan-official
Copy link
Member Author

@rojasTob no worries, i hope you are feeling better now. We ended up adding active storage for the work we did over user model.

But avatars and attachments still remain with carrierwave, so feel free to continue with this issue. Good luck and thanks a lot again for working on this.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend Changes related to backend / ruby code hacktoberfest Issues to work during hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants