[v6] How to delete an uploaded file with adonisjs please ? #4536
Answered
by
MaximeMRF
franckDev21
asked this question in
Help
-
I'd like to know how to delete the files I previously downloaded in a specific folder. Please, how can I do that? |
Beta Was this translation helpful? Give feedback.
Answered by
MaximeMRF
Apr 21, 2024
Replies: 1 comment 3 replies
-
Hello @franckDev21, you can stock in a sql table the path of your file. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
franckDev21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @franckDev21, you can stock in a sql table the path of your file.
For example if you have a Profile table you create one column named
picture_link
that is the link to your image on your upload folder. Then if you want to delete the image or file you have just to retrieve the path with thepicture_link
column then delete it with the filesystem.