2011-05-22 102 views

回答

1

从我在这里读到的thread。文件类型信息在MIME头的“Content-Disposition”部分中发送。

所以我通过使用URLRequest classcontentType属性来计算,你应该能够确定传入文件的文件类型。

+0

对于PROGRESS和COMPLETE事件,urlrequest.contentType都为null。 – Yeti 2011-05-22 15:39:12

+1

您也可以尝试在“URLLoader”上侦听[HTTPStatusEvent](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/HTTPStatusEvent.html)。 该事件有一个属性'responseHeaders',它可能包含内容类型。 – jmathew 2011-05-22 16:26:40