Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drhuffman12/enable_android_non_get_downloads #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/Scripts/jquery.fileDownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ $.extend({
//
failMessageHtml: null,

//
//Non-get Downloads work in newer Chrome browsers for Android; androidPostUnsupportedMessageHtml should be Deprecated.
//the stock android browser straight up doesn't support file downloads initiated by a non GET: http://code.google.com/p/android/issues/detail?id=1780
//specify a message here to display if a user tries with an android browser
//if jQuery UI is installed this will be a dialog, otherwise it will be an alert
//Set to null to disable the message and attempt to download anyway
//
androidPostUnsupportedMessageHtml: "Unfortunately your Android browser doesn't support this type of file download. Please try again with a different browser.",
androidPostUnsupportedMessageHtml: "Deprecated and usage has been removed; you shouldn't see this message!",

//
//Requires jQuery UI: options to pass into jQuery UI Dialog
Expand Down Expand Up @@ -168,18 +168,6 @@ $.extend({

var httpMethodUpper = settings.httpMethod.toUpperCase();

if (isAndroid && httpMethodUpper !== "GET" && settings.androidPostUnsupportedMessageHtml) {
//the stock android browser straight up doesn't support file downloads initiated by non GET requests: http://code.google.com/p/android/issues/detail?id=1780

if ($().dialog) {
$("<div>").html(settings.androidPostUnsupportedMessageHtml).dialog(settings.dialogOptions);
} else {
alert(settings.androidPostUnsupportedMessageHtml);
}

return deferred.reject();
}

var $preparingDialog = null;

var internalCallbacks = {
Expand Down