|
|
@@ -42,7 +42,6 @@
|
|
|
|
|
|
<script>
|
|
|
import { submitVideo } from '@/api/video'
|
|
|
-import { getOssPolicy } from '@/api/file'
|
|
|
import { hashFile } from '@/utils/hash'
|
|
|
|
|
|
export default {
|
|
|
@@ -71,7 +70,6 @@ export default {
|
|
|
return {
|
|
|
key: this.form.objectName,
|
|
|
acl: '',
|
|
|
- policy: '',
|
|
|
'content-type': '',
|
|
|
'success_action_redirect': '',
|
|
|
'x-amz-meta-uuid': '',
|
|
|
@@ -97,7 +95,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getOssPolicyWrapper()
|
|
|
},
|
|
|
methods: {
|
|
|
/***********************************************************************/
|
|
|
@@ -168,32 +165,6 @@ export default {
|
|
|
this.form.title = title
|
|
|
}
|
|
|
},
|
|
|
- getOssPolicyWrapper() {
|
|
|
- getOssPolicy(this.videoPost)
|
|
|
- .then(res => {
|
|
|
- if (res.code === 0) {
|
|
|
- this.form.objectName = res.data.objectName
|
|
|
- } else {
|
|
|
- this.$notify(
|
|
|
- {
|
|
|
- title: '提示',
|
|
|
- message: res.msg,
|
|
|
- type: 'warning',
|
|
|
- duration: 3000
|
|
|
- }
|
|
|
- )
|
|
|
- }
|
|
|
- }).catch(error => {
|
|
|
- this.$notify(
|
|
|
- {
|
|
|
- title: '提示',
|
|
|
- message: error.message,
|
|
|
- type: 'warning',
|
|
|
- duration: 3000
|
|
|
- }
|
|
|
- )
|
|
|
- })
|
|
|
- },
|
|
|
onSubmit() {
|
|
|
if (!this.form.objectName) {
|
|
|
this.$notify(
|