开发者

Change Upload control Types of file

开发者 https://www.devze.com 2023-02-22 01:19 出处:网络
I have added validation to validate if the user has chosen .doc file or not. But I want to show only .doc files by changing the \"files of type to .doc\" i开发者_Go百科n file upload window. Is it poss

I have added validation to validate if the user has chosen .doc file or not. But I want to show only .doc files by changing the "files of type to .doc" i开发者_Go百科n file upload window. Is it possible?


You cannot limit the types the file upload dialog that is generated by the browser in most cases, but there are some ways to work around this by using a flash file upload component like Uploadify .

I think some latest versions of some browsers may have an attribute to control this, but it is specific to those browsers and not ready to be relied on, but maybe in the future this will be an option.

0

精彩评论

暂无评论...
验证码 换一张
取 消