richardgirges / express-fileupload

Simple express file upload middleware that wraps around busboy
MIT License
1.52k stars 261 forks source link

Fix #290 #291

Closed jeanbmar closed 2 years ago

jeanbmar commented 2 years ago

This PR fixes https://github.com/richardgirges/express-fileupload/issues/290. To avoid a breaking change, everything but buffer instances remains unchanged.

richardgirges commented 2 years ago

Hi @jeanbmar - I had to revert this PR due to a failing test (see below). This failing test is mission-critical and introduces a large breaking change. I appreciate the PR though, and if you can spare some time to resolve, we can get this re-merged. Please open a new PR, thanks!

  162 passing (10s)
  1 failing

  1) Test Single File Upload w/ .mv() Promise
       fail when using HEAD:
     Error: write EPIPE
      at afterWriteDispatched (internal/stream_base_commons.js:154:25)
      at writeGeneric (internal/stream_base_commons.js:145:3)
      at Socket._writeGeneric (net.js:786:11)
      at Socket._write (net.js:798:8)
      at doWrite (_stream_writable.js:403:12)
      at clearBuffer (_stream_writable.js:542:7)
      at Socket.Writable.uncork (_stream_writable.js:338:7)
      at ClientRequest.OutgoingMessage.uncork (_http_outgoing.js:244:17)
      at connectionCorkNT (_http_outgoing.js:690:8)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)
richardgirges commented 2 years ago

Nevermind! My mistake. This test was failing regardless of your PR. I apologize for the confusion. I will get this PR re-merged and deployed in the next release. Thank you!

jeanbmar commented 2 years ago

Thanks!

DanRibbens commented 2 years ago

Thanks everyone for working on this! @richardgirges Is there any timeline on next release? We're waiting on this to close a dependent issue.

jmikrut commented 2 years ago

Hey @richardgirges — just checking on a status update here as Payload requires this to be resolved to close an open issue we have.

Thank you!

richardgirges commented 2 years ago

Hi @jmikrut - this has been released in v1.2.1+.

I apologize, as the release notes did not have #291 listed. I've updated the release notes to reflect this update: https://github.com/richardgirges/express-fileupload/releases/tag/v1.2.1

If you're running on Node v12+, I would recommend upgrading to the latest version (v1.3.1) to take advantage of the latest security patches.