You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that tempfiles created when uploading a file (Rack::Multipart) are not closed and unlink by default. Fortunately, Rack provides a middleware for it and we just need to add it
Rails includes it by design so its not an issue when using Grape through it.
The scope would be easier to review if the first version defined a small acceptance contract for Include Rack::TempFileReaper in Grape ?. I would call out the default behavior, the migration/backwards-compatibility story, and one or two cases that are intentionally out of scope so the implementation does not grow beyond the original request.
Activity
hiSandog commentedon Jul 8, 2026
The scope would be easier to review if the first version defined a small acceptance contract for
Include Rack::TempFileReaper in Grape ?. I would call out the default behavior, the migration/backwards-compatibility story, and one or two cases that are intentionally out of scope so the implementation does not grow beyond the original request.ericproulx commentedon Jul 8, 2026
I think having a opt-in parameter like
lint!would be a great start.Add contribution ruby-grape/grape#2487
Add Rack::TempfileReaper to the endpoint middleware stack
Close and delete multipart upload tempfiles once the response is closed
Close and delete multipart upload tempfiles once the response is closed