I was wondering if it’s possible to check how much bandwidth has been used by shared files.
IE: if a file has been shared publicly, I’d like to prevent massive bandwidth usage. (Similar to dropbox, if too many downloads have happened, it restricts access to the file).
Is this possible in nextcloud? or is there perhaps some API to keep track of this?
You would need to modify the source code so it uses mysql to keep track of every shared file download. You could do this by adding a integer to the table and every download increases it by 1.
If you want to limit by bandwidth then you would need to implement a function that checks the file size * mysql integer. I believe this is also stored in the mysql database.
If you do code this in please create a pull request on github so other people can use this feature!