phparmy Posted August 7, 2007 Share Posted August 7, 2007 Iam using Xajax. How can i get file size before uploading file. Link to comment https://forums.phpfreaks.com/topic/63699-how-to-get-file-size-by-ajax/ Share on other sites More sharing options...
jitesh Posted August 7, 2007 Share Posted August 7, 2007 Try javascript to get file size function A() { var oas = new ActiveXObject("Scripting.FileSystemObject"); var d = document.a.b.value; var e = oas.getFile(d); var f = e.size; alert(f + " bytes"); } </script> </head> <body> <form name="a"> <input type="file" name="b"> <input type="button" name="c" value="SIZE" onClick="A();"> </form> </body> </html> Link to comment https://forums.phpfreaks.com/topic/63699-how-to-get-file-size-by-ajax/#findComment-317434 Share on other sites More sharing options...
NArc0t1c Posted August 7, 2007 Share Posted August 7, 2007 This section is actually php help but okay. http://www.ajaxfreaks.com Link to comment https://forums.phpfreaks.com/topic/63699-how-to-get-file-size-by-ajax/#findComment-317436 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.