Closed willianspraciano closed 1 year ago
@willianspraciano
could you explain to me how is the user's photo (which is a FileEntity) sent to s3
Upload files to S3 via multerS3
here
Additionally, could you clarify how it is deleted if I update the photo?
We prefer not to delete files, as this may have negative experience during restoring data. Also for this reason we also use Soft-Delete approach in database. However, if you need to delete files you can create your own handler, cronjob, etc.
More info about uploading files you can find here: https://github.com/brocoders/nestjs-boilerplate/blob/main/docs/file-uploading.md
@Shchepotin Thank you for the clarification. I hadn't noticed that link to the Full Documentation in my initial read of the README. It makes a lot of sense. I was thinking that the user service would handle the creation of the File itself, but in this case, a file is first created and then this already created file is sent to the user. It's a great implementation, congratulations.
It's not a bug but a question, could you explain to me how is the user's photo (which is a FileEntity) sent to s3? Additionally, could you clarify how it is deleted if I update the photo?
My doubt is why, from what I've seen in the users.service file, it doesn't use the files.service