Update server.js
Browse files
server.js
CHANGED
|
@@ -74,6 +74,10 @@ app.all('/', async (req, res) => {
|
|
| 74 |
color: #aaa;
|
| 75 |
}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
.file-upload-container {
|
| 78 |
display: flex;
|
| 79 |
flex-direction: column;
|
|
@@ -183,12 +187,10 @@ app.all('/', async (req, res) => {
|
|
| 183 |
|
| 184 |
if (file) {
|
| 185 |
let fileSize = formatFileSize(file.size);
|
| 186 |
-
|
| 187 |
-
|
| 188 |
fileInfo.innerHTML = \`
|
| 189 |
<strong>Name:</strong> \${file.name}.<br>
|
| 190 |
<strong>Size:</strong> \${fileSize}<br>
|
| 191 |
-
<strong>Last Modified:</strong> \${lastModified}
|
| 192 |
\`;
|
| 193 |
|
| 194 |
uploadFile(file, uploadStatus, loading);
|
|
@@ -211,7 +213,7 @@ app.all('/', async (req, res) => {
|
|
| 211 |
.then(response => response.json())
|
| 212 |
.then(data => {
|
| 213 |
loading.style.display = "none";
|
| 214 |
-
uploadStatus.innerHTML =
|
| 215 |
})
|
| 216 |
.catch(error => {
|
| 217 |
loading.style.display = "none";
|
|
|
|
| 74 |
color: #aaa;
|
| 75 |
}
|
| 76 |
|
| 77 |
+
a {
|
| 78 |
+
color: #aaa;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
.file-upload-container {
|
| 82 |
display: flex;
|
| 83 |
flex-direction: column;
|
|
|
|
| 187 |
|
| 188 |
if (file) {
|
| 189 |
let fileSize = formatFileSize(file.size);
|
| 190 |
+
|
|
|
|
| 191 |
fileInfo.innerHTML = \`
|
| 192 |
<strong>Name:</strong> \${file.name}.<br>
|
| 193 |
<strong>Size:</strong> \${fileSize}<br>
|
|
|
|
| 194 |
\`;
|
| 195 |
|
| 196 |
uploadFile(file, uploadStatus, loading);
|
|
|
|
| 213 |
.then(response => response.json())
|
| 214 |
.then(data => {
|
| 215 |
loading.style.display = "none";
|
| 216 |
+
uploadStatus.innerHTML = \`<a href="\${data.url}" target="_blank">\${data.url}</a>.\`;
|
| 217 |
})
|
| 218 |
.catch(error => {
|
| 219 |
loading.style.display = "none";
|