I just realized that one can only POST about 8 MB of data. I have a form to upload multiple files. This files are sent to a php page through POST method where it gets uploaded. Now, I want to check the size of data which will be posted and give an alert message. How can I do that? I googled a bit and found that $_SERVER['CONTENT_LENGTH'] can be used to find this. Unfortunately, I can't figure out how to use it? Here's my form:
<form name="offer" onsubmit="return validateForm()" action="fileupload.php" method="post" enctype="multipart/form-data">
<tr>
<td>I9:</td>
<td> Doc: <input type="file" id="myfile" name="myfile[]"><p id="list"></p></td>
</tr>
<tr >
<td>Client document: </td>
<td> Doc: <input type="file" id="myfile" name="myfile[]"></td>
</tr>
<tr>
<td>FCRA :</td>
<td> Doc: <input type="file" id="myfile" name="myfile[]"></td>
</tr>
<tr>
<td>Insurance Certificate :</td>
<td> Doc: <input type="file" id="myfile" name="myfile[]"></td>
</tr>
<tr>
<td>Work Order :</td>
<td> Doc: <input type="file" id="myfile" name="myfile[]"></td>
</tr>
Also, is it possible to display the size of each uploaded file? I know this can be done by javascript. But how?