I would use what I could to limit the non-malicious user to send the proper
file types and there is a type property to help.
Example from MM Help.
var imageTypes:Object = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
allTypes.push(imageTypes);
...... More code
fileRef.browse(allTypes);
A serverside script is likely needed to handle the multipart/form-data
coming from Flash. Flash is probably doing no more than what you do in html
<FORM METHOD=POST ENCTYPE="multipart/form-data"
ACTION="uploadserversidescript.php">
File to upload: <INPUT TYPE=FILE NAME="file"><BR/>
<INPUT TYPE=SUBMIT VALUE="Submit"/>
</FORM>
Flash can help filter the file extension but I do not believe it will look
at the bit structure in the file to help determine the type. I suspect it
could upload any file on the computer the user selects. The file extension
of course does not guarantee the contents of a file, rather I believe that
the bit layout in the file is the signature that would be used to identify
the file type if need be.
If you want to validate the file bit structure, you may need the server side
to do that work and it can accept or reject the upload.
You can limit the size by checking the size property in the onSelect
handler.
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "jonnybennett" <webforumsuser@macromedia.com> wrote in message
news:dlcuac$2sg$1@forums.macromedia.com...
Thanks for your reply. Just to clarify your answer. Flash should
automatically
detect as to whether a file is a genuine .jpeg or .flv or (whatever file
type)
and if it detects a file as being a virus it will not let the user select
this
file as a file for upload?