diff --git a/static/js/chunkupload.js b/static/js/chunkupload.js index 91e836e25..fc598e8f0 100644 --- a/static/js/chunkupload.js +++ b/static/js/chunkupload.js @@ -73,10 +73,10 @@ pandora.chunkupload = function(options) { maxRetry = response.maxRetry; } chunkURL = response.uploadUrl; - if (document.location.protocol == 'https:') { - chunkURL = chunkURL.replace(/http:\/\//, 'https://'); - } if (chunkURL) { + if (document.location.protocol == 'https:') { + chunkURL = chunkURL.replace(/http:\/\//, 'https://'); + } that.status = 'uploading'; that.progress = 0.0; // start upload