Update index.js
Browse files
index.js
CHANGED
@@ -55,7 +55,7 @@ app.get('/', (req, res) => {
|
|
55 |
document.body.appendChild(a);
|
56 |
a.click();
|
57 |
window.URL.revokeObjectURL(url);
|
58 |
-
|
59 |
});
|
60 |
} else {
|
61 |
alert('Failed to upload file.');
|
@@ -92,8 +92,8 @@ app.post('/upload', upload.single('file'), async (req, res) => {
|
|
92 |
|
93 |
const text = `
|
94 |
File Name: ${fileName}
|
95 |
-
File
|
96 |
-
File
|
97 |
Created At: ${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}
|
98 |
Created By: ${hostname}
|
99 |
`;
|
|
|
55 |
document.body.appendChild(a);
|
56 |
a.click();
|
57 |
window.URL.revokeObjectURL(url);
|
58 |
+
// alert('File downloaded successfully!');
|
59 |
});
|
60 |
} else {
|
61 |
alert('Failed to upload file.');
|
|
|
92 |
|
93 |
const text = `
|
94 |
File Name: ${fileName}
|
95 |
+
File Type: ${fileType}
|
96 |
+
File Size: ${fileBuffer.length} bytes
|
97 |
Created At: ${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}
|
98 |
Created By: ${hostname}
|
99 |
`;
|