Fix uploaded file path

This commit is contained in:
lights0123 2020-11-22 18:49:26 -05:00
parent a7e90368f2
commit b88a9c6555
No known key found for this signature in database
GPG key ID: 28F315322E37972F

View file

@ -116,7 +116,7 @@ class Devices extends Vue implements GenericDevices {
await downloadFile(rpc, cmd.path);
} else if (cmd.action === 'upload') {
if (!('file' in cmd)) return;
await uploadFile(rpc, cmd.path + cmd.file.name, new Uint8Array(await cmd.file.arrayBuffer()));
await uploadFile(rpc, `${cmd.path}/${cmd.file.name}`, new Uint8Array(await cmd.file.arrayBuffer()));
} else if (cmd.action === 'uploadOs') {
if (!('file' in cmd)) return;
await uploadOs(rpc, new Uint8Array(await cmd.file.arrayBuffer()));