Remove backgrounds from images directly in the browser environment with ease and no additional costs or privacy concerns. Explore an interactive demo.
GNU Affero General Public License v3.0
5.89k
stars
362
forks
source link
API request keeps failing #121
Open
almirchowdhury opened 6 months ago
here is my backend: import express from 'express'; import multer from 'multer'; import { removeBackground } from '@imgly/background-removal-node';
const router = express.Router(); const upload = multer({ storage: multer.memoryStorage() });
router.post('/remove-background', upload.single('image'), async (req, res) => { try { const imageBuffer = req.file.buffer; const blob = await removeBackground(imageBuffer);
});
export default router;
FE Implentation: const handleRemoveBackground = async () => { if (!imageFile) { console.error('No image file available for background removal.'); return; }
}; keep getting internal server error plz help