mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 05:06:05 +08:00
Fix OS upgrade page (#306)
* fix OS upgrade page Signed-off-by: Andy Lee <andy.lee@suse.com> * move uploadFile action Signed-off-by: Andy Lee <andy.lee@suse.com> * change os upgrage ui to standard feature Signed-off-by: a110605 <andy.lee@suse.com> * Add uploadImage cancel Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com> Signed-off-by: a110605 <andy.lee@suse.com>
This commit is contained in:
@@ -305,7 +305,7 @@ export default class HciVmImage extends HarvesterResource {
|
||||
}
|
||||
|
||||
get uploadImage() {
|
||||
return async(file) => {
|
||||
return async(file, opt) => {
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append('chunk', file);
|
||||
@@ -319,6 +319,7 @@ export default class HciVmImage extends HarvesterResource {
|
||||
'File-Size': file.size,
|
||||
},
|
||||
params: { size: file.size },
|
||||
signal: opt.signal,
|
||||
});
|
||||
} catch (err) {
|
||||
this.$ctx.commit('harvester-common/uploadError', { name: this.name, message: err.message }, { root: true });
|
||||
|
||||
Reference in New Issue
Block a user