Skip to content

Instantly share code, notes, and snippets.

@indutny-signal
Created June 25, 2024 16:57
Show Gist options
  • Save indutny-signal/9602403f5b0a946d139398e9bad8222c to your computer and use it in GitHub Desktop.
Save indutny-signal/9602403f5b0a946d139398e9bad8222c to your computer and use it in GitHub Desktop.
'use strict';
const Dicer = require('dicer');
const dicer = new Dicer({
boundary: '----WebKitFormBoundaryoo6vortfDzBsDiro',
});
dicer.on('part', (p) => {
// This is important
p.on('error', () => {});
});
dicer.on('error', () => {});
dicer.write('------WebKitFormBoundaryoo6vortfDzBsDiro\r\n Content-Disposition: form-data; name="bildbeschreibung"\r\n\r\n\r\n------WebKitFormBoundaryoo6vortfDzBsDiro--');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment