Bobby Wibowo 3 years ago
parent
commit
38d77fdfbb
2 changed files with 2 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 1 1
      controllers/uploadController.js

+ 1 - 0
.gitignore

@@ -11,3 +11,4 @@ pages/custom/**
 migrate.js
 yarn.lock
 package-lock.json
+.vscode/

+ 1 - 1
controllers/uploadController.js

@@ -98,7 +98,7 @@ uploadsController.actuallyUpload = async (req, res, userid, album) => {
 						hash: fileHash,
 						ip: req.ip,
 						albumid: album,
-						userid: userid.id,
+						userid: userid !== undefined ? userid.id : null,
 						timestamp: Math.floor(Date.now() / 1000)
 					});
 				} else {