QRACK uploads are failing because the required upload directory does not exist on the server.
/home/boxhub/boxhub-api/uploads/home/boxhub/boxhub-api/uploads/qrack-itemsThe following directories already exist:
avatarsconstruction-logsdiscart-itemsinsuranceproject-documentsproject-permitsSSH into the server and run:
cd /home/boxhub/boxhub-api/uploads
mkdir -p qrack-items
chmod 755 qrack-items
Update the backend upload handler to automatically create the directory if it doesn’t exist, following the same pattern used for other upload directories.
Example Node.js/Express pattern:
const fs = require('fs').promises;
const path = require('path');
const uploadDir = path.join(__dirname, '../uploads/qrack-items');
// Ensure directory exists
try {
await fs.mkdir(uploadDir, { recursive: true });
} catch (error) {
console.error('Failed to create upload directory:', error);
throw error;
}
Example PHP/Laravel pattern:
$uploadPath = storage_path('app/public/uploads/qrack-items');
if (!File::exists($uploadPath)) {
File::makeDirectory($uploadPath, 0755, true);
}
755 (rwxr-xr-x)www-data, nginx, or boxhub)After creating the directory, verify:
ls -la /home/boxhub/boxhub-api/uploads/ | grep qrackstat /home/boxhub/boxhub-api/uploads/qrack-items'files' as the FormData key (plural) to match Discart-me pattern'files' key in the multipart form data