fyf-2024.07.09-21:07

房煜飞
tomato 8 months ago
parent 79f53a6bda
commit ee769119f4

@ -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