0

How can I retrieve file information (size of file) before it is uploaded to the webserver?

I would like to create a multi file upload. I have it working in JQuery but I would like to know the size of the files to set a limition by summing up the total the file sizes together.

John
  • 107
  • 5
  • possible duplicate of [Find file size with jQuery](http://stackoverflow.com/questions/1440723/find-file-size-with-jquery) – Tim Schmelter Feb 07 '11 at 23:03
  • @Tim no, your´s is getting filesize of a file on a server, this one is aasking for one at client side – Luke Feb 07 '11 at 23:08

1 Answers1

1

SWFUpload has a File Object which provides it, though I don't know how well that's going to complete with your own code if you're writing your own multi-upload. If nothing else, you can look at the source and see how they're doing it, though they may be using the Flash interface for that.

Chris B. Behrens
  • 6,255
  • 8
  • 45
  • 71
  • Thank you but would like not to depend on flash plugin. – John Feb 08 '11 at 12:24
  • Well, I'm not 100% sure that that part comes from the plugin, so it might be worth a few minutes to look at the source. It might give you some good ideas in any case. – Chris B. Behrens Feb 08 '11 at 14:33