Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting for alternative rack tempfile directory #5958

Merged
merged 4 commits into from
Jul 31, 2024

Conversation

masaball
Copy link
Contributor

Related issue: #5948

The variable that needs to be set to override the default factory is part of the Rack request.env hash. Creating a custom middleware to handle injecting the lambda seemed to be the best approach.

Having the error handling in the initialize method will log any issues once during app startup. The factory logic can be called multiple times during a single upload, so this seemed like the simplest way to get the error logged without triggering, potentially multiple times, on every upload in the application. It does run the risk of not being noticed that way though so I'm not sure which approach is actually better.

Copy link
Member

@cjcolvar cjcolvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

masaball and others added 3 commits July 30, 2024 12:30
Co-authored-by: Mason Ballengee <masaball@iu.edu>
Co-authored-by: Chris Colvard <chris.colvard@gmail.com>
@masaball masaball merged commit 71b03a4 into develop Jul 31, 2024
2 checks passed
@masaball masaball deleted the tempfile_location branch July 31, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants