File: BACKEND/controllers/product.controller.js (lines 11-21)
Severity: MEDIUM
Problem: The uploadToCloudinary function creates a stream but never attaches an error handler. If the stream emits an error before the callback is invoked, the promise never settles, causing the HTTP request to hang indefinitely until timeout.
Fix: Add stream.on('error', reject) before stream.end(buffer).
File: BACKEND/controllers/product.controller.js (lines 11-21)
Severity: MEDIUM
Problem: The uploadToCloudinary function creates a stream but never attaches an error handler. If the stream emits an error before the callback is invoked, the promise never settles, causing the HTTP request to hang indefinitely until timeout.
Fix: Add stream.on('error', reject) before stream.end(buffer).