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

feat(server): allow to override filename when using random_url #233

Merged
merged 3 commits into from Feb 12, 2024

Conversation

tessus
Copy link
Contributor

@tessus tessus commented Jan 30, 2024

Description

curl -F "file=@x.txt" -H "filename:override.txt" http://localhost:8000

Even if random_url is set, the filename will be override.txt (the name specified in the header filename).

Motivation and Context

See issue #217

closes #217

How Has This Been Tested?

  • manually
  • cargo test
  • fixtures

Changelog Entry

### Added

- Allow to override the filename when using `random_url`

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tessus tessus requested a review from orhun as a code owner January 30, 2024 01:47
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2003abe) 70.11% compared to head (c7b8a11) 70.88%.
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #233      +/-   ##
==========================================
+ Coverage   70.11%   70.88%   +0.76%     
==========================================
  Files          11       11              
  Lines         609      625      +16     
==========================================
+ Hits          427      443      +16     
  Misses        182      182              
Flag Coverage Δ
unit-tests 70.88% <100.00%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tessus
Copy link
Contributor Author

tessus commented Feb 9, 2024

I saw your blog post and checked out your talk about ratatui. It was great and it looked like you had a lot of fun. (I seriously enjoyed you skipping the emacs slide.) Argh, too bad I didn't get a sticker. ;-)

Btw, is there still anything open for my PRs that I haven't addressed?

@orhun
Copy link
Owner

orhun commented Feb 9, 2024

Hey @tessus! Thanks for watching my talk and your comments. I highly appreciate it.

I was not able to take a look at PRs but now I have some free time. Will add a review soon! Sorry for the wait.

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Just minor points 🐻

README.md Outdated Show resolved Hide resolved
src/header.rs Outdated Show resolved Hide resolved
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Awesome!

@orhun orhun merged commit db971e6 into orhun:master Feb 12, 2024
8 checks passed
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.

Allowing predefined filenames when using random_url
3 participants