Click to See Complete Forum and Search --> : Doing math on a filesize in JavaScript.


Lucefiel
11-07-2000, 07:49 PM
Specifically, how to I "save" the filesize of a file in JavaScript so that I can divide it by two (yes, that's all I want to do).

I know how to grab the filesize, but I'm not sure if you can modify the value at all without changing it into an actual variable and I don't know how to do that.

------------------
May the best of your past be the worst of your future.

Dru Lee Parsec
11-08-2000, 12:30 PM
Well, how do you find the filesize? I couldn't find that one in my books.

But if the following is true:

var tmp = [some code to get the filesize];

then
var half = tmp/2;