This commit is contained in:
@@ -30,8 +30,11 @@ pub const ALLOWED_ISO_MIME_TYPES: [&str; 4] = [
|
|||||||
pub const ISO_MAX_SIZE: FileSize = FileSize::from_gb(10);
|
pub const ISO_MAX_SIZE: FileSize = FileSize::from_gb(10);
|
||||||
|
|
||||||
/// Allowed uploaded disk images formats
|
/// Allowed uploaded disk images formats
|
||||||
pub const ALLOWED_DISK_IMAGES_MIME_TYPES: [&str; 2] =
|
pub const ALLOWED_DISK_IMAGES_MIME_TYPES: [&str; 3] = [
|
||||||
["application/x-qemu-disk", "application/gzip"];
|
"application/x-qemu-disk",
|
||||||
|
"application/gzip",
|
||||||
|
"application/octet-stream",
|
||||||
|
];
|
||||||
|
|
||||||
/// Disk image max size
|
/// Disk image max size
|
||||||
pub const DISK_IMAGE_MAX_SIZE: FileSize = FileSize::from_gb(10 * 1000);
|
pub const DISK_IMAGE_MAX_SIZE: FileSize = FileSize::from_gb(10 * 1000);
|
||||||
|
@@ -467,7 +467,10 @@ impl VMInfo {
|
|||||||
.disks
|
.disks
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|d| d.device == "disk")
|
.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(),
|
.collect(),
|
||||||
|
|
||||||
networks: domain
|
networks: domain
|
||||||
|
@@ -138,7 +138,7 @@ export class VMInfo implements VMInfoInterface {
|
|||||||
name: "",
|
name: "",
|
||||||
boot_type: "UEFI",
|
boot_type: "UEFI",
|
||||||
architecture: "x86_64",
|
architecture: "x86_64",
|
||||||
memory: 1024,
|
memory: 1000 * 1000 * 1000,
|
||||||
number_vcpu: 1,
|
number_vcpu: 1,
|
||||||
vnc_access: true,
|
vnc_access: true,
|
||||||
iso_files: [],
|
iso_files: [],
|
||||||
|
Reference in New Issue
Block a user