Commit efb613a1 authored by youjie's avatar youjie
parents e843bb1b 2f163d82
...@@ -1138,6 +1138,7 @@ export default { ...@@ -1138,6 +1138,7 @@ export default {
}; };
try { try {
let url = oss.signatureUrl(objectKey); let url = oss.signatureUrl(objectKey);
console.log("url", url);
let getBlob = new Promise(resolve => { let getBlob = new Promise(resolve => {
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.open('GET', url, true); xhr.open('GET', url, true);
...@@ -1145,6 +1146,11 @@ export default { ...@@ -1145,6 +1146,11 @@ export default {
xhr.onload = () => { xhr.onload = () => {
if (xhr.status === 200) { if (xhr.status === 200) {
resolve(xhr.response); resolve(xhr.response);
} else if (xhr.status === 404) {
console.log("downloadChengDuFileRename_404", objectKey);
if (callBack) {
callBack(resultJson)
}
} }
}; };
xhr.send(); xhr.send();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment