Forums

setting storage quota on app upload directory

I am about to add an image upload feature to my flask app and I am slightly worried about this feature being abused if it is discovered by ***holes. I will not be promoting this in anyway. It is portfolio project and at this point for my personal learning purposes.

But as a backup plan, in case the logic I setup in my app fails or the enemy finds a loophole to exploit is there a way, in my account, to set the upload destination directory to only accept a few files or only allow like 200M of storage?

I will be adding rate limiting file size limits in my app. I will try to add some logic to check the size of the directory before an upload begins. I am checking to see if there is something I can setup on the system in case my app is compromised somehow.

What kind of compromising do you have in mind?

I guess I am just worried about filling up my whole storage limit and having to clear it out manually.

my thinking is that if the uploads directory fills up, I am clear it out at my own convenience without any other jobs being affected.

nothing life threatening.

hmm- i guess the normal way to do this would be to make it so that you need to login before you can upload?