Skip to content

[v6] How to delete an uploaded file with adonisjs please ? #4536

Answered by MaximeMRF
franckDev21 asked this question in Help
Discussion options

You must be logged in to vote

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 the picture_link column then delete it with the filesystem.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@franckDev21
Comment options

@MaximeMRF
Comment options

@franckDev21
Comment options

Answer selected by franckDev21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants