Update for project move on server, add ability to update existing POs, add spec lookup page, enhance copy down functionality.

This commit is contained in:
2026-05-13 11:28:35 -04:00
parent 38f4db3d15
commit c0f4f1de0d
26 changed files with 1414 additions and 103 deletions
+6 -4
View File
@@ -11,8 +11,8 @@ const axios = require('axios');
const net = require('net');
// Create uploads directory if it doesn't exist
const uploadsDir = path.join('/var/www/html/inventory/uploads/products');
const reusableUploadsDir = path.join('/var/www/html/inventory/uploads/reusable');
const uploadsDir = path.join('/var/www/inventory/uploads/products');
const reusableUploadsDir = path.join('/var/www/inventory/uploads/reusable');
fs.mkdirSync(uploadsDir, { recursive: true });
fs.mkdirSync(reusableUploadsDir, { recursive: true });
@@ -513,10 +513,12 @@ const storage = multer.diskStorage({
}
});
const upload = multer({
const MAX_UPLOAD_BYTES = 25 * 1024 * 1024;
const upload = multer({
storage: storage,
limits: {
fileSize: 15 * 1024 * 1024, // Allow bigger uploads; processing will reduce to 5MB
fileSize: MAX_UPLOAD_BYTES,
},
fileFilter: function (req, file, cb) {
// Accept only image files