My PHP is configured with a limit of 2MB for file uploads.
If I try and upload (through a PHP script) a file which is more than 2MB, the browser doesn't stop when it gets to 2MB, it uploads the entire thing, and then my PHP script says it's too large.
My question is, why does the browser not stop at 2MB and reject the file? Since the file won't be stored if it's over the limit, where does this data being uploaded actually go?
My VPS is configured with 512MB RAM and 7GB storage. Does this mean someone can upload a file bigger than 512MB or 7GB and it will kill the server because it runs out of memory/space?