()
| 141 | } |
| 142 | |
| 143 | async stop() { |
| 144 | if (!this.prepared) { |
| 145 | this.canceled = true; |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | const { execute: uploadFile } = uploadFileApi(); |
| 150 | await uploadFile({ |
| 151 | url: `${this.url}/upload-new/${this.id}`, |
| 152 | params: { |
| 153 | stop: true |
| 154 | } |
| 155 | }); |
| 156 | this.onEnd(); |
| 157 | uploadService.files.delete(this.id!); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | class UploadTask { |