diff --git a/scripts/config.js b/scripts/config.js
index 256b8c3..46f5725 100644
--- a/scripts/config.js
+++ b/scripts/config.js
@@ -203,9 +203,7 @@ async function handleDiskDetach() {
}
async function handleDiskAttach() {
- let diskImage = config.data[this.dataset.disk];
-
- let header = `Attach ${diskImage}`;
+ let header = `Attach ${this.dataset.disk}`;
let body = ``;
dialog(header, body, async (result, form) => {
@@ -217,7 +215,7 @@ async function handleDiskAttach() {
type: type,
vmid: vmid,
disk: `${type === "qemu" ? "sata" : "mp"}${device}`,
- data: type === "lxc" ? diskImage + `,mp=/mp${device}/` : diskImage
+ source: this.dataset.disk.replace("unused", "")
}
let result = await requestAPI("/instance/disk/attach", "POST", body);
if (result.status === 200) {