Spaces:
Running
Running
update CRUD
Browse files
app.js
CHANGED
|
@@ -80,7 +80,7 @@ app.post("/upload", upload.single("file"), (req, res) => {
|
|
| 80 |
file_type: req.file.mimetype,
|
| 81 |
uploadTime: Date.now(),
|
| 82 |
file_url: `${req.protocol}://${req.get("host")}/files/${filePath}`,
|
| 83 |
-
expires_in: fileData[
|
| 84 |
// Format sesuai sisa waktu
|
| 85 |
});
|
| 86 |
});
|
|
|
|
| 80 |
file_type: req.file.mimetype,
|
| 81 |
uploadTime: Date.now(),
|
| 82 |
file_url: `${req.protocol}://${req.get("host")}/files/${filePath}`,
|
| 83 |
+
expires_in: fileData[filePath] ? formatRemainingTime(fileData[filePath].expiredAt) : "Unknown"
|
| 84 |
// Format sesuai sisa waktu
|
| 85 |
});
|
| 86 |
});
|