Merge pull request '合并' (#5) from 房煜飞 into main

main
p3nf9s2xv 8 months ago
commit 382f6c74e6

@ -42,7 +42,7 @@ app.post('/api/upload', upload.single('image'), function(req, res) {// 单文件
const fileName = file.originalname;
const filePath = path.join(__dirname, 'uploads', fileName);
const user_name = req.query.user_name
// Check if file with same hash already exists in database
// 检查是否相同哈西值的数据存在
const sqlCheck = 'SELECT * FROM images WHERE hash = ?';
connection.query(sqlCheck, [fileHash], function(err, result) {
if (err) {

Loading…
Cancel
Save