merson
asked on
detect file size
hi,
could u plz. give me the javascript code to determine the file size?
thanx in advance.
merson
ASKER
see i want to findout the size of a file(any images,documents,...etc) in my computer.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hmm cj,
Javascript can be server side too.
But if you want to know the filesize of files on the client side.
You can try this :
bytesize of the document that the script is running from :
document.filesize
and for images :
myImage = new Image();
myImage.src = 'file:///D|/test.gif';
myimage.filesize //will return the image in bytes
Javascript can be server side too.
But if you want to know the filesize of files on the client side.
You can try this :
bytesize of the document that the script is running from :
document.filesize
and for images :
myImage = new Image();
myImage.src = 'file:///D|/test.gif';
myimage.filesize //will return the image in bytes
But for a detaild file info of your files.. you could run a webserver and use FileSystemObject.
Or you could do like CJ_S said
Or you could do like CJ_S said
This question has been abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
In the absence of responses, I may recommend DELETE unless it is clear
to me that it has value as a PAQ. Silence = you don't care
</note>
Cd&
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.
<note>
In the absence of responses, I may recommend DELETE unless it is clear
to me that it has value as a PAQ. Silence = you don't care
</note>
Cd&
It is time to clean this abandoned question up.
I am putting it on a clean up list for CS.
<recommendation>
points to CJ_S
</recommendation>
If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.
Cd&
I am putting it on a clean up list for CS.
<recommendation>
points to CJ_S
</recommendation>
If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.
Cd&
per recommendation
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
There are no predefined functions which can tell you the file-size of any page currently loaded...
does that answer your question?
regards,
CJ