合并 #5

Merged
p3nf9s2xv merged 1 commits from 房煜飞 into main 7 months ago

@ -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) {
@ -89,4 +89,4 @@ var server = app.listen(8087, '0.0.0.0', function () {
console.log('[connection connect] succeed!');
});
console.log("应用实例,访问地址为 http://%s:%s", host, port)
})
})

Loading…
Cancel
Save