: How can I make my binary file is served as binary and not text when user choose "Save Linked File As..." in Safari? I'm serving a binary file (.IPA) with Ubuntu/Apache 2.2. When I have chosen
I'm serving a binary file (.IPA) with Ubuntu/Apache 2.2.
When I have chosen Save Linked File As... in Safari, it says it's text file. And it guides me to add .txt extension. However it does not add any extra extension when I download it just clicking link.
I added line AddType application/octet-stream .ipa in apache configuration file. I don't know what's wrong with this. Is this a bug of Safari or my misconfiguration? (1) If it caused by bug, how can I avoid this? (2) Or if it caused by misconfiguration, what should I do?
More posts by @Becky754
1 Comments
Sorted by latest first Latest Oldest Best
It is caused by Safari's behaviour and can be avoided by using JavaScript to disable context menus:
var browser = navigator.userAgent;
if (browser.toLowerCase().indexOf('safari') > 0)
{
var allLinks = document.body.getElementsByTagName('a');
for (var i=0; i<allLinks.length; i++) {
allLinks[i].oncontextmenu = function() { return false };
}
}
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.