forked from 0x2620/pandora
- fix upload for non admin users
- fix https test - give permission denied warning if upload is not working
This commit is contained in:
parent
084fde7b67
commit
e5107d8610
3 changed files with 15 additions and 5 deletions
|
|
@ -39,14 +39,20 @@ pandora.ui.upload = function(oshash, file) {
|
|||
that.progress = -1;
|
||||
done();
|
||||
}
|
||||
if (response.status && response.status.code != 200) {
|
||||
that.status = response.status.text;
|
||||
that.progress = -1;
|
||||
done();
|
||||
response = {};
|
||||
}
|
||||
if (response.maxRetry) {
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue