limit progress to 1, remove domain from chunk url
This commit is contained in:
parent
11e36b550e
commit
343ab26aa4
1 changed files with 4 additions and 4 deletions
|
@ -75,9 +75,9 @@ pandora.chunkupload = function(options) {
|
||||||
}
|
}
|
||||||
chunkURL = response.uploadUrl;
|
chunkURL = response.uploadUrl;
|
||||||
if (chunkURL) {
|
if (chunkURL) {
|
||||||
if (document.location.protocol == 'https:') {
|
// only take local part of url
|
||||||
chunkURL = chunkURL.replace(/http:\/\//, 'https://');
|
var url = Ox.parseURL(chunkURL);
|
||||||
}
|
chunkURL = url.pathname + url.search;
|
||||||
that.status = 'uploading';
|
that.status = 'uploading';
|
||||||
that.progress = 0.0;
|
that.progress = 0.0;
|
||||||
// start upload
|
// start upload
|
||||||
|
@ -136,7 +136,7 @@ pandora.chunkupload = function(options) {
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
|
||||||
progress(parseFloat(chunkOffset)/bytesAvailable);
|
progress(Math.min(parseFloat(chunkOffset)/bytesAvailable), 1);
|
||||||
|
|
||||||
request = new XMLHttpRequest();
|
request = new XMLHttpRequest();
|
||||||
request.addEventListener('load', function (evt) {
|
request.addEventListener('load', function (evt) {
|
||||||
|
|
Loading…
Reference in a new issue