Add ai supplemental fields to product import, fix image upload url, misc changes for netcup server

This commit is contained in:
2025-10-03 13:14:22 -04:00
parent dd79298b94
commit 451d5f0b3b
14 changed files with 860 additions and 28 deletions

View File

@@ -376,8 +376,8 @@ router.post('/upload-image', upload.single('image'), (req, res) => {
});
// Create URL for the uploaded file - using an absolute URL with domain
// This will generate a URL like: https://inventory.acot.site/uploads/products/filename.jpg
const baseUrl = 'https://inventory.acot.site';
// This will generate a URL like: https://acot.site/uploads/products/filename.jpg
const baseUrl = 'https://acot.site';
const imageUrl = `${baseUrl}/uploads/products/${req.file.filename}`;
// Schedule this image for deletion in 24 hours

View File

@@ -194,7 +194,7 @@ router.post('/upload', upload.single('image'), async (req, res) => {
}
// Create URL for the uploaded file
const baseUrl = 'https://inventory.acot.site';
const baseUrl = 'https://acot.site';
const imageUrl = `${baseUrl}/uploads/reusable/${req.file.filename}`;
const pool = req.app.locals.pool;