From 84e6cfdec3ea4425400dfb6b71147fedfd6866bc Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 17 Mar 2012 02:06:49 +0100 Subject: [PATCH] no upscaling, uploadUrl has to be https --- static/js/pandora/upload.js | 3 +++ static/js/pandora/uploadDialog.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/upload.js b/static/js/pandora/upload.js index b9a5ed3ba..00c8352ea 100644 --- a/static/js/pandora/upload.js +++ b/static/js/pandora/upload.js @@ -43,6 +43,9 @@ pandora.ui.upload = function(oshash, file) { maxRetry = response.maxRetry; } chunkUrl = response.uploadUrl; + if (document.location.protocol == 'https:') { + chunkUrl = chunkUrl.replace(/http:\/\//, 'https://'); + } if (chunkUrl) { that.status = 'uploading'; that.progress = 0.0; diff --git a/static/js/pandora/uploadDialog.js b/static/js/pandora/uploadDialog.js index fe05406cd..ff11b47cf 100644 --- a/static/js/pandora/uploadDialog.js +++ b/static/js/pandora/uploadDialog.js @@ -281,7 +281,7 @@ pandora.ui.uploadDialog = function(data) { options.noUpscaling = true; if((!info.video.length || (info.video[0].codec == options.videoCodec - && info.video[0].height == options.height)) + && info.video[0].height <= options.height)) && (!info.audio.length || info.audio[0].codec == options.audioCodec)) { options = { passthrough: true