I’m using the FileReference class to upload flvs to a server.
Is it possible to check the flv length not size before allowing an upload?
I’m using the FileReference class to upload flvs to a server. Is it possible
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you targeting Flash Player 10 alone or lower versions too? Because lower versions of Flash player (9 etc) do not allow the uploading SWF to read the contents of file (other than creationDate, creator (The Macintosh creator type of the file), modificationDate, name, size in bytes and type), so there is no way you are going to be able to do this on those players.
If you are targeting solely FP10 users, you can load the FLV into a
ByteArrayin your SWF andByteArrayas input – and after reading this thread in SO, it seems like that is not possible at all.durationproperty from its metadata. The FLV file specification is open, but this isn’t going to be easy.Update to the comment:
Excerpts from the FLV file spec:
FLV file can contain metadata – it doesn’t say it will contain metadata. It also says that available properties can vary based on the software used to create FLV. So I guess there is no guarantee (as per specs) that the
durationproperty will be present. That said,durationis one of the basic properties of FLV and it would be safe to assume that any reasonable software would include it.