This is a followup PR for #596 (which has been closed in favor of this) to propose a less risky and a backwards compatible approach for multipart requests.
Using temporary files storage is broken with the current release all resources on stream close mechanism. Fixing it is barely feasible without introducing a breaking change.
Still, the current mechanism is really convenient: you consume the stream and you are done! It's working perfectly fine as long as you keep all your data on memory.
=> Let's keep it that way.
I propose here to introduce a manual-cleanup? flag (a better name can be proposed) which will return a vector composed of a manifold.stream and a cleanup function which can be called after the stream has been consumed.
This PR doesn't aim at bringing a file granularity clean up function (which I think is not necessary) as proposed by #596.
I had to rebase on master (and handle merge conflicts), but your comments have been addressed.
I also bumped to Clojure 1.11 to have access to parse-uuid.
Description
This is a followup PR for #596 (which has been closed in favor of this) to propose a less risky and a backwards compatible approach for multipart requests.
Using temporary files storage is broken with the current
release all resources on stream close
mechanism. Fixing it is barely feasible without introducing a breaking change. Still, the current mechanism is really convenient: you consume the stream and you are done! It's working perfectly fine as long as you keep all your data on memory. => Let's keep it that way.I propose here to introduce a
manual-cleanup?
flag (a better name can be proposed) which will return a vector composed of a manifold.stream and acleanup
function which can be called after the stream has been consumed.This PR doesn't aim at bringing a file granularity clean up function (which I think is not necessary) as proposed by #596.
And there is also a cljdoc article attached to this PR : https://github.com/clj-commons/aleph/compare/multipart-requests?expand=1#diff-45f6713a5206dde4c1c69d8ddc5242e5ed09e8256ecec0ab80ff911bb8e967c3R1-R82
Closes : #567