Upload User & Course related files by shrine gem
kyoshizaki opened this issue · 1 comments
kyoshizaki commented
Issue
- Since the Paperclip gem is deprecated, LePo is going to use the other gem, Shrine.
- As the 1st step in gem migration, the following upload files are going to be treated by Shrine gem.
- User.image
- Course.image
- SnippetFile.upload
- OutcomeFile.upload
- For User.image and Course.image
- Situation: Image1 has already uploaded
- Cache and image2 files remain when uploading the image2 and remove_file option on
ToDo
Path replacement for the upload files
- Course.image
- Shrine:/storage/courses/:id/UUID
- User.image
- Shrine:/storage/users/:id/UUID
- SnippetFile => Snippet
- Shrine:/storage/users/:snippet_manager_id/UUID
- OutcomeFile
- Shrine:/storage/users/:outcome_manager_id/:outcome_folder_name/:filename
Snippet.image instead of Snippet_file.upload
Delete Snippet.ajax_upload action and use Snippet.ajax_update
Update data in DB by version up button for administrator
Update the code and DB without unused paperclip gem
kyoshizaki commented
Done!