aws上传路径变更
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
371a3acff2
commit
857abb2c0d
|
@ -363,7 +363,6 @@ export default {
|
|||
return (this.option = this.$d.FeedBackTypeToCRC);
|
||||
},
|
||||
setTitle(code, name) {
|
||||
console.log(code, name);
|
||||
if (this.hasPermi(["role:pm"]) && this.visitTaskId) {
|
||||
return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ export async function exist(s3, bucket, fileInformation, progressFn, changeStatu
|
|||
if (fileInformation.sharding.length === 0) {
|
||||
let existBucket = await existInBucket({ s3, bucket, fileInformation: fileInformation });
|
||||
if (existBucket === 'true') {
|
||||
progressFn(0, fileInformation.file, 1);
|
||||
progressFn(1, fileInformation.file, 0);
|
||||
changeStatus(fileInformation.path, 'success');//直接告诉前端,状态
|
||||
return;
|
||||
} else if (existBucket === 'same key') {
|
||||
|
|
|
@ -188,11 +188,14 @@ function uploadAWS(aws, data, progress) {
|
|||
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
||||
data.path = objectItem.join('/')
|
||||
}
|
||||
await exist(aws, Vue.prototype.OSSclientConfig.bucket, data, progress, (path, status) => {
|
||||
let bucketName = data.path.split("/")[1] || Vue.prototype.OSSclientConfig.bucket
|
||||
let curPath = data.path;
|
||||
data.path = data.path.replace(`/${bucketName}/`, '');
|
||||
await exist(aws, bucketName, data, progress, (path, status) => {
|
||||
if (status === 'success') {
|
||||
resolve({
|
||||
name: Vue.prototype.OSSclientConfig.bucket + "/" + decodeUtf8(path),
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + Vue.prototype.OSSclientConfig.bucket + "/" + decodeUtf8(path)
|
||||
name: decodeUtf8(curPath),
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(curPath)
|
||||
})
|
||||
} else {
|
||||
reject()
|
||||
|
|
Loading…
Reference in New Issue