orhun / rustypaste

A minimal file upload/pastebin service.
https://blog.orhun.dev/blazingly-fast-file-sharing
MIT License
757 stars 47 forks source link

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

Closed tessus closed 6 months ago

tessus commented 7 months ago

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?

Changelog Entry

### Added

- Allow to override the filename when using `random_url`

Types of Changes

Checklist:

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/orhun/rustypaste/pull/233/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) | Coverage Δ | | |---|---|---| | [unit-tests](https://app.codecov.io/gh/orhun/rustypaste/pull/233/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z) | `70.88% <100.00%> (+0.76%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Orhun+Parmaks%C4%B1z#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tessus commented 6 months ago

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 commented 6 months ago

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.