john
john

Reputation: 535

How can I find out size of a local file using flash

I am trying to create an uploader in flash, To do so I have to find out size of the file before uploading to the server, How can I find out this ?

Upvotes: 3

Views: 405

Answers (2)

Lars Blåsjö
Lars Blåsjö

Reputation: 6127

Use FileReference.size.

Upvotes: 1

PatrickS
PatrickS

Reputation: 9572

You would need to have a PHP script that you could call before attempting to load the file the script would return the filesize which you would retrieve with Actionscript

PHP function filesize() http://php.net/manual/en/function.filesize.php

check the URLVariables class http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/

Upvotes: 0

Related Questions