Skip to content

Commit

Permalink
feat(api): allow upload of unhandled disk type as raw
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Apr 26, 2022
1 parent 0279dbd commit 7c59a93
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/xo-server/src/api/disk.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ async function handleImport(req, res, { type, name, description, vmdkData, srId,
size = footer.currentSize
}
break
case 'iso':
default:
diskFormat = VDI_FORMAT_RAW
vhdStream = part
size = part.byteCount
break
default:
throw new JsonRpcError(`Unknown disk type, expected "iso", "vhd" or "vmdk", got ${type}`)
}

const vdi = await xapi.createVdi({
Expand Down

0 comments on commit 7c59a93

Please sign in to comment.