fullpwerr commited on
Commit
9f94caa
·
1 Parent(s): 392f9bd
Files changed (1) hide show
  1. app.js +1 -1
app.js CHANGED
@@ -58,7 +58,7 @@ app.post("/upload", upload.single("file"), (req, res) => {
58
 
59
  const filePath = req.file.filename;
60
  const expiresAt = Date.now() + EXPIRATION_TIME;
61
- fileData[filePath] += expiresAt;
62
  fs.writeFile(META_FILE, JSON.stringify(fileData, null, 2), (err) => {
63
  if (err) console.error("Gagal menulis ke api.json:", err);
64
  });
 
58
 
59
  const filePath = req.file.filename;
60
  const expiresAt = Date.now() + EXPIRATION_TIME;
61
+ fileData[filePath] = expiresAt;
62
  fs.writeFile(META_FILE, JSON.stringify(fileData, null, 2), (err) => {
63
  if (err) console.error("Gagal menulis ke api.json:", err);
64
  });