This commit is contained in:
parent
1d4af8c74e
commit
ef0d77f1d6
@ -30,8 +30,11 @@ pub const ALLOWED_ISO_MIME_TYPES: [&str; 4] = [
|
||||
pub const ISO_MAX_SIZE: FileSize = FileSize::from_gb(10);
|
||||
|
||||
/// Allowed uploaded disk images formats
|
||||
pub const ALLOWED_DISK_IMAGES_MIME_TYPES: [&str; 2] =
|
||||
["application/x-qemu-disk", "application/gzip"];
|
||||
pub const ALLOWED_DISK_IMAGES_MIME_TYPES: [&str; 3] = [
|
||||
"application/x-qemu-disk",
|
||||
"application/gzip",
|
||||
"application/octet-stream",
|
||||
];
|
||||
|
||||
/// Disk image max size
|
||||
pub const DISK_IMAGE_MAX_SIZE: FileSize = FileSize::from_gb(10 * 1000);
|
||||
|
@ -467,7 +467,10 @@ impl VMInfo {
|
||||
.disks
|
||||
.iter()
|
||||
.filter(|d| d.device == "disk")
|
||||
.map(|d| VMFileDisk::load_from_file(&d.source.file).unwrap())
|
||||
.map(|d| {
|
||||
VMFileDisk::load_from_file(&d.source.file)
|
||||
.expect("Failed to load file disk information!")
|
||||
})
|
||||
.collect(),
|
||||
|
||||
networks: domain
|
||||
|
@ -138,7 +138,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
name: "",
|
||||
boot_type: "UEFI",
|
||||
architecture: "x86_64",
|
||||
memory: 1024,
|
||||
memory: 1000 * 1000 * 1000,
|
||||
number_vcpu: 1,
|
||||
vnc_access: true,
|
||||
iso_files: [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user