MCPcopy
hub / github.com/node-formidable/formidable / write

Method write

src/Formidable.js:286–303  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

284 }
285
286 write(buffer) {
287 if (this.error) {
288 return null;
289 }
290 if (!this._parser) {
291 this._error(
292 new FormidableError('uninitialized parser', errors.uninitializedParser),
293 );
294 return null;
295 }
296
297 this.bytesReceived += buffer.length;
298 this.emit('progress', this.bytesReceived, this.bytesExpected);
299
300 this._parser.write(buffer);
301
302 return this.bytesReceived;
303 }
304
305 onPart(part) {
306 // this method can be overwritten by the user

Callers 15

parseMethod · 0.95
index.jsFile · 0.45
createMultipartBufferFunction · 0.45
json.test.jsFile · 0.45
issue-46.test.jsFile · 0.45
_handlePartMethod · 0.45
initFunction · 0.45

Calls 1

_errorMethod · 0.95

Tested by

no test coverage detected