fileReference browse from js, simulate keypress in flash workaround

99封情书 提交于 2019-12-11 23:37:51

问题


I am trying to call fileReference.browse from outside the flash SWF, i read some articles that said normally it's imposible due to Flash 10 security stuff.. so i was wondering isnt it posible to send a command from js to flash which will simulate a keypress inside the flash, which (this keypress) will trigger the fileReference.

Thank you in advance, Daniel!


回答1:


It's impossible (it would create quite a serious security risk). You can confirm this by checking any uploader module out there that uses Flash's FileReference... all of them use either a transparent flash overlay to register the click or the upload button itself is a customizable SWF (until recently gmail used a transparent overlay, now it uses native uploads I think).



来源:https://stackoverflow.com/questions/10323976/filereference-browse-from-js-simulate-keypress-in-flash-workaround

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!