ruby-grape / ruby-grape/grape

Include Rack::TempFileReaper in Grape ?

Open Beginner friendly
#2,487 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request you can help
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Grape's middleware setup and compare it with Rack's TempFileReaper, whose implementation is linked in the issue. Confirm that multipart uploads clean up their temporary files without relying on Rails, then verify the relevant upload behavior with the existing test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.