File downloads not working in chrome which have Pe

2019-06-05 22:10发布

问题:

Users unable to download files through our flex website using Chrome which have Pepper Flash player plug-in. Downloads no longer working in Chrome from a navigateToUrl call in Flex. However if i disable the pepper flash plug-in in chrome then it works fine. Do you guys know any workaround to this issue?

回答1:

Had the same issue. Try use ExternalInterface.

In html in the JS section:

function downloadFileFromAS( _fileURL ) {
    window.location.href=_fileURL;
}

In AS3:

if( ExternalInterface.available ) {
    ExternalInterface.call( "downloadFileFromAS", fileUrlGoesHere );
}

Remember to set allowscriptaccess = "always" in html

It looks like it works at least for me.

Greg