@nmshd/connector-tui 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,14 +26,21 @@ export function AddUploadFile(Base) {
|
|
|
26
26
|
name: "title",
|
|
27
27
|
initial: "aFile",
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
message: "Whats the files description?",
|
|
31
|
+
type: "text",
|
|
32
|
+
name: "description",
|
|
33
|
+
initial: "A file.",
|
|
34
|
+
},
|
|
29
35
|
]);
|
|
30
36
|
const title = result.title;
|
|
31
37
|
const expiresAt = DateTime.local().plus({ days: 1 }).toISO();
|
|
32
38
|
const filename = result.filename;
|
|
39
|
+
const description = result.description;
|
|
33
40
|
if (!title || !filename)
|
|
34
41
|
return console.log("No file / title selected");
|
|
35
42
|
const file = await fs.promises.readFile(path.resolve(this.assetFolder, filename));
|
|
36
|
-
const uploadedFile = await this.connectorClient.files.uploadOwnFile({ title, expiresAt, file, filename });
|
|
43
|
+
const uploadedFile = await this.connectorClient.files.uploadOwnFile({ title, expiresAt, file, filename, description });
|
|
37
44
|
const render = await prompts({
|
|
38
45
|
name: "yesno",
|
|
39
46
|
message: "Do you want to render a QR Code for this file?",
|