Refactor file upload in Personal Snippets
When we are creating a new personal snippet and we upload a file inside the description, when the snippet is successfully created, we call move_temporary_files
to move those uploaded files to the recently created snippet.
For the upcoming edit VUE refactor, where we will call the GraphQL mutations instead of the controller action, we need to move that operation to the service Snippets::CreateService
.
I think it will be a matter of just moving move_temporary_files
to the service and call it once the snippet has been successfully created and the files committed to the repository. The needed param files
needed for that operation is already passed to the service.