View Full Version : Size of file on domain
bluewalrus
10-22-2009, 02:17 PM
Is there a way to get the size of a file with javascript, if it makes a difference it would be on my domain? Similiar to the filesize of php, I can't use the php function because the file is uploading.
jscheuer1
10-22-2009, 02:54 PM
As far as I know, this is only possible in IE and only for images. Even in IE though, I believe the file must be complete before its size 'property' can be accessed.
However, (not being much of a PHP person) I imagine that there must be at least a few plug ins or existing code for PHP that might even allow for a progress bar of sorts for this sort of thing. They may also involve AJAX and javascript perhaps (to allow for near real time rendering), but the information on the status of the upload in progress should at least be available on the server side.
bluewalrus
10-22-2009, 03:22 PM
Oh, okay. All the php solutions I've found say to get the 2 locations, the temporary file location, and the file's destination location and compare the size of them while the upload is occuring. Maybe someone could shift this to the php forum and I could see if anyone there knows a way to go about this? Thanks.
jscheuer1
10-24-2009, 06:45 PM
I see no one has responded yet. I did a Google that looks promising:
http://www.google.com/search?client=opera&rls=en&q=PHP+javascript+progress+bar+for+upload&sourceid=opera&ie=utf-8&oe=utf-8
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.