TheReverend403 / uPste

A file hosting application with an emphasis on serving technology communities.
https://u.pste.pw
GNU Affero General Public License v3.0
45 stars 8 forks source link

Add button to remove all uploads #27

Closed X11 closed 7 years ago

X11 commented 7 years ago

This PR will add a new button in the user uploads page to delete all his uploads all at once. It will ask the user for confirmation to so it an user will not delete all his uploads by a mis-click or mistake.

X11 commented 7 years ago

Using the ->get() method will return all uploads from the database and not lazy load them. The N+1 problem would have happend when you access them by property. F.e. user()->uploads. Though this got me thinking and it does instead suffer from a N+1 problem when deleting the actual items from the database as it invalidates the user cache and issues a delete statement on each ->forceDelete().