Releases: orhun/rustypaste
v0.15.1
Added
- Include file creation date in the file list (
creation_date_utc
)
$ curl "http://<server_address>/list" | jq .
[
{
"file_name": "immense-goose.txt",
"file_size": 416,
"creation_date_utc": "2024-06-12 19:21:56",
"expires_at_utc": null
}
]
- Enable Docker ARM64 builds
- Add @tessus as a maintainer
Removed
- Remove public instance link and blog post from README.md
Fixed
- Fix uploading reports to codecov
New Contributors
Full Changelog: v0.15.0...v0.15.1
v0.15.0
Added
Now you can use the filename
header to override the name of the uploaded file.
For example:
curl -F "file=@x.txt" -H "filename:override.txt" http://localhost:8000
Even if random_url
is set, the filename will be override.txt
rustypaste-cli
also has a new argument for overriding the file name:
rpaste -n filename-on-server.txt awesome.txt
rustypaste
now returns more appropriate status codes in the following 2 cases (instead of a generic 500 code):
- If the mime type is on the blacklist:
UnsupportedMediaType
(415) - If the file already exists:
Conflict
(409)
Changed
- Do path joins more safely by @RealOrangeOne in #247
- Gracefully exit when there is no config file found by @orhun
- Switch to cargo-llvm-cov for code coverage by @orhun in #260
- Replace unmaintained action by @tessus in #266
- Set up mergify by @orhun
- Apply clippy suggestions by @orhun
- Update funding options by @orhun
- Update the copyright years by @orhun
- Bump dependencies
Fixed
- Improve logging for deleted file by @tessus in #235
- Fix deployment by @tessus in #236
- Return the correct file on multiple files with same name by @tessus in #234
- Update the hash of the example file by @tessus in #254
- Error on upload with the same filename by @tessus in #258
New Contributors
- @RealOrangeOne made their first contribution in #247
v0.14.4
v0.14.3
v0.14.2
v0.14.1
v0.14.0
Added
- Add delete endpoint (#136)
Now you can delete files from the server with sending a DELETE
request. To enable this, set the delete_tokens
array in the configuration file or use the DELETE_TOKEN
environment variable.
[server]
delete_tokens = [ "may_the_force_be_with_you" ]
And then you can send a DELETE
request as follows:
$ curl -H "Authorization: may_the_force_be_with_you" -X DELETE "<server_address>/file.txt"
file deleted
You can also use rpaste
(the command line tool) to delete files:
$ rpaste -d awesome.UA86.txt
Changed
- Update crates and rustls deps (#135)
- Bump Shuttle to
0.25.0
v0.13.0
Added
- Support handling spaces in filenames (#107)
Now you can replace the whitespaces with either underscore or encoded space (%20
) character in the filenames.
For example:
[server]
handle_spaces = "replace"
$ curl -F "file=@test file.txt" <server_address>
<server_address>/test_file.txt
Or you can use encoded spaces:
[server]
handle_spaces = "encode"
$ curl -F "file=@test file.txt" <server_address>
<server_address>/test%20file.txt
Please note that random_url
should not be configured to use the original file names.
Changed
- Improve random_url config handling (#122)
[paste].random_url.enabled
is deprecated. You can now disable random URLs by commenting out [paste].random_url
.
# enabled
random_url = { type = "petname", words = 2, separator = "-" }
# disabled
# random_url = { type = "petname", words = 2, separator = "-" }
- Replace unmaintained actions (#116)
- Bump Shuttle to
0.24.0
- Bump dependencies
Fixed
- Don't log invalid token in release builds (#112)
Before, invalid tokens were logged as follows:
[2023-08-13T19:24:30Z WARN rustypaste::auth] authorization failure for a.b.c.d (header: invalid_token)
Now, we print the token only in debug mode. In release mode, the log entry will look like this:
[2023-08-13T19:24:30Z WARN rustypaste::auth] authorization failure for a.b.c.d
v0.12.1
v0.12.0
Added
- Add an endpoint for retrieving a list of files (#94)
Set the expose_list
option to true
in the configuration file for enabling this feature. It is disabled as default.
[server]
expose_list = true
Then you can receive the list of files as JSON via /list
endpoint:
$ curl "http://<server_address>/list" | jq .
[
{
"file_name": "accepted-cicada.txt",
"file_size": 241,
"expires_at_utc": null
},
{
"file_name": "evolving-ferret.txt",
"file_size": 111,
"expires_at_utc": "2023-08-07 10:51:14"
}
]
- Support multiple auth tokens (#84)
auth_token
option is now deprecated and replaced with auth_tokens
which supports an array of authentication tokens. For example:
[server]
auth_tokens = [
"super_secret_token1",
"super_secret_token2",
]
- Add new line character to most prominent messages (#97)
This is a follow-up to #72 for making the terminal output better:
$ curl http://localhost:8000/sweeping-tahr
unauthorized
Changed
- Bump Shuttle to
0.23.0
- Bump dependencies
Fixed
- Deploy the Shuttle service when a new tag is created