Online Kredit ohne Schufa - Privatkredit - PS2 Xbox Nintendo Dreamcast Games - Debt Consolidation - Record Internet Radio with Tags - Find jobs

PDA

View Full Version : get file size without activex using javascript


ade_ari_w0
Aug 8th 2007, 8:58 pm
how to get file size using javascript without activeX coz this is for linux

Thnx

nico_swd
Aug 9th 2007, 12:36 am
Not possible. And this ActiveX you're talking will work only on a very few browsers.

krt
Aug 9th 2007, 1:38 am
Kudos on understanding what he meant :D

ade_ari, are you talking about the file size a user selects in an "upload file" form or the file size of an arbitrary file on their computer. The former can be done by uploading the file to your server's temp directory and using filesize()

sharry
Aug 20th 2007, 7:29 am
yes u can use ajax to accomplish this.. call a php script which returns the filesize, and load the echoed result into a div

Wildhoney
Aug 20th 2007, 11:52 am
PHP can do this because it is server-side, but if you remember, Javascript is client-side and thus getting the file-size of a file on an external server would require communication to an external server. Thus as aforementioned, AJAX is the way to accomplish this.

nico_swd
Aug 21st 2007, 5:32 am
As far as I understood, he wants to get the size of a local file. But something's telling me he won't come back anyway. =p