We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i have an isuue with GF parsing attachment emails, i am not able even check if attachments was arrived, here is my nodejs function
app.post('', async function(req, res) { try { if (req.method === 'POST') { const busboy = new Busboy({ headers: req.headers, limits: 50000000 }); const uploads = {}; const body = {}; busboy.on('field', (fieldname, val) => { body[fieldname] = val; }); const tmpdir = os.tmpdir(); const fileWrites = []; busboy.on('file', (fieldname, file, filename) => { const filepath = path.join(tmpdir, filename); uploads[fieldname] = { filename: filename || file.name || 'temp.temp', filepath, file, }; const writeStream = fs.createWriteStream(filepath); file.pipe(writeStream); const promise = new Promise((resolve, reject) => { file.on('end', () => { writeStream.end(); }); writeStream.on('finish', resolve); writeStream.on('error', reject); }); fileWrites.push(promise); }); busboy.on('finish', () => { Promise.all(fileWrites).then(async () => { try { //uploads always are empty } catch (e) { console.log(e); } }); }); busboy.end(req.rawBody || req.body); } else { res.status(405).send({ error: 'ONLY POST' }); } console.log('Start logging--', req.body); } catch (e) { console.log(e); res.status(400).send(e.message || e); } });
Can you help to find out the issue?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, i have an isuue with GF parsing attachment emails, i am not able even check if attachments was arrived, here is my nodejs function
Can you help to find out the issue?
The text was updated successfully, but these errors were encountered: