Commit Graph

52 Commits

Author SHA1 Message Date
Orhun Parmaksız 1fd561f869
docs(readme): add packaging status badge 2024-03-27 17:39:35 +03:00
Helmut K. C. Tessarek db971e6434
feat(server): allow to override filename when using random_url (#233)
* feat(server): allow to override filename when using random_url

* docs(README): remove line from features

* refactor(header): make const private
2024-02-12 13:06:12 +01:00
Artem Medvedev b74e9ceeaf
docs(readme): explain behavior of unset `auth_tokens` and `delete_tokens` (#202)
* doc(readme): explain behavior of unset `auth_tokens` & `delete_tokens`

Just a clarification on how this works in the case of uninstalled tokens, for greater clarity and security

* docs(readme): update styling

* docs(readme): update grammar

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-12-11 19:19:18 +01:00
Orhun Parmaksız c6d32d6df9
docs(readme): update table of contents 2023-11-03 10:32:32 +01:00
DtxdF 9a73b3e9c5
docs(readme): add instructions for FreeBSD (#177)
* docs(readme): add instructions for FreeBSD

* docs(readme): add appjail to features section
2023-11-03 10:32:09 +01:00
Andy Baird 27e3be5a2d
feat(server): add delete endpoint (#136)
* Delete endpoint implementation with delete_tokens configuration

* style(server): remove empty line, add dot at end of doc comment

* test(fixtures): add fixture test for file delete

* refactor(config): add delete_tokens to config.toml

* docs(readme): add info on how to delete file from server

* Update README.md

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* Update README.md

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* refactor(server): use log::error! and return 500

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>

* test(server): add test_delete_file_without_token_in_config

* refactor(server): use one function to retrieve auth/delete tokens

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>

* test(config): add test_get_tokens

* test(config): improve test_get_tokens

* feat(config): disallow empty tokens

* feat(server): update the messages for delete endpoint

---------

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-09-03 17:47:52 +02:00
Orhun Parmaksız a44ae94132
chore(release): prepare for v0.13.0 2023-08-26 23:40:04 +03:00
Andy Baird d0a67751dc
feat(server): add an endpoint for retrieving a list of files (#94)
* Start

* Wip

* Implement path based JSON index

* Remove json_index_path

* Return datetime stamp instead of relative time

* Add file size to list item

* Add auth check when retrieving JSON index

* Make json index path hardcoded

* Test (currently failing)

* Fix test for test_json_list

* Clippy fix

* Revert cargo to original versions with only needed changes

* Add detail about auth guard affecting list route

* Change json_index_path to expose_list

* Remove unneeded linebreak

* Remove unnecessary import

* Remove unnecessary space at end of line

* Move config check after auth check

* Use new auth check syntax, add docs to struct, rename test_json_list to test_list

* Replace chrono usage with uts2ts

* Check list result in test

* Add example to README

* Upgrade serde_json to 1.0.103

* Add linebreak

* Remove unneeded clone

* Remove extra nl

* Update README.md

* Update README.md

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* Update README.md

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* Remove serde_json

* Set default config to false for expose_list

* Apply suggestions from code review

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* Check that option is value in test_list

* Update Cargo.toml

Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>

* Update cargo.lock

* Use expect() to check file name

* Remove underscore from list item struct

* Keep comma after last line

* refactor(server): rename ListItem fields

* test(fixtures): add fixture test for listing files

* test push

* remove file again

* chop off ts from filename and minor refactor

* update README

* docs(readme): fix capitalization

* refactor(server): clean up list implementation

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
Co-authored-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
2023-08-07 12:55:13 +02:00
Helmut K. C. Tessarek 0d4808880f
feat(server): support multiple auth tokens (#84)
* feat(server): support multiple auth tokens

Example:

```toml
[server]
auth_tokens = [
  "super_secret_token1",
  "super_secret_token2",
]
```

The previously used `AUTH_TOKEN` environment variable can still be used
and will be evaluated as well.

* fixtures: add all tokens in array to the test

* add deprecation warning for auth_token

* also add deprecation warnings at server startup

* fix formatting

* fixed tests, so that we do not use deprecated config options

* use bash array

* refactor: use separate function

* refactor: check auth tokens

* Update fixtures/test-server-auth-multiple-tokens/test.sh

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>

* refactor: convert functions to methods

* refactor: check function

* refactor: get_tokens method

* style(format): add newline between functions

* refactor(server): print deprecation warnings once

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-07-21 12:28:17 +02:00
Helmut K. C. Tessarek 62bbfef6a3
feat(server): add random suffix mode (#69)
* add random suffix mode

* fix linter issues

* add test case

* fix linter issues

* add comments, remove empty lines and single line declarations

* more test cases

* refactor(config): rename suffix_mode to random_suffix

* refactor(paste): clean up the random suffix logic

* chore(config): add random suffix example to default config

* docs(readme): mention random suffix feature

* test(fixtures): add fixture test for random suffix mode

* random_suffix -> suffix_mode

* fix default extension for .dotfile w/o extension

* fix formatting

* style(format): fix the indentation for random suffix fixture

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-07-01 00:11:16 +02:00
Orhun Parmaksız 5b01c98243
docs(readme): note that the Alpine package is moved to the community 2023-06-16 17:41:59 +03:00
Helmut K. C. Tessarek 917074158a
docs(readme): list all supported units for expiry (#63)
These suffixes are also supported in the `config.toml`.
2023-06-13 00:14:05 +02:00
Orhun Parmaksız f165c29faf
docs(readme): add link to the blog post 2023-05-31 01:24:46 +03:00
Orhun Parmaksız ebe2087845
docs(readme): add table of contents 2023-05-31 01:22:57 +03:00
Chris Jones 1a89589669
docs(example): add information about using HTML form (#51)
* docs(readme): add information about using html form

* chore(example): improve HTML form example

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-05-31 00:21:15 +02:00
Rahul Garg bd88146430
feat(server): support one shot URLs (#46)
* Add support for OneshotUrl

* Review cmt: Update README

* docs(oneshot): update documentation about oneshot URLs

* Review cmt: revert fmt

* test(fixtures): add fixture test for oneshot URLs

---------

Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2023-05-28 22:09:14 +02:00
Orhun Parmaksız 9ead53097e
docs(readme): fix the OpenSSL feature example 2023-05-17 14:27:04 +03:00
Orhun Parmaksız 8359aadec6
docs(readme): mention the available feature flags 2023-05-17 14:04:32 +03:00
Orhun Parmaksız 5b45b35a44
docs(readme): add information about how to run test fixtures 2023-05-17 12:29:40 +03:00
Orhun Parmaksız c1b47e28c9
docs(readme): add instructions for Alpine Linux 2023-05-17 12:28:39 +03:00
Orhun Parmaksız 00d46b4b21
style(readme): add badges to README.md 2023-05-17 04:32:54 +03:00
Orhun Parmaksız 9e61cca98e
docs(readme): update features section about `default_expiry` 2023-05-14 23:55:47 +03:00
Orhun Parmaksız 29ddef8df0
feat(deploy): deploy on shuttle.rs (#36)
* feat(deploy): deploy on shuttle.rs

* chore(deploy): add automated shuttle deploy workflow

* style(readme): update the formatting in README.md

* chore(deploy): optimize shuttle workflow

* fix(deploy): start the project

* fix(deploy): remove start step

This reverts commit 4f25921aeb.

* chore(deploy): expose the version for the public instance

* docs(lib): update the comment for shuttle entry-point

* chore(deploy): run the shuttle deployment on new tag
2023-05-14 18:03:53 +02:00
Orhun Parmaksız 99ac6156a8
feat(server): allow downloading files via `?download=true` parameter (#24) 2023-01-31 21:03:00 +03:00
Orhun Parmaksız 59415cd31a
docs(readme): update contributing details 2022-05-16 10:28:57 +03:00
Orhun Parmaksız 9136d1ce09
docs(readme): add testing instructions to README.md 2022-03-23 16:41:09 +03:00
Orhun Parmaksız dd91c50d50
feat(server): support auto-deletion of expired files (#17)
feat(server): support auto-deletion of expired files (#17)

chore(ci): set the number of test threads to 1

feat(config): allow the real-time update of cleanup routine

docs(readme): update README.md about deleting expired files
2022-03-23 16:13:46 +03:00
Orhun Parmaksız 51d6fdd0d8
docs(readme): reorder sections in README.md 2022-03-17 11:53:16 +03:00
Orhun Parmaksız 2d5c14a6e0
docs(readme): apply shellcheck suggestions to cleanup script 2022-03-17 11:50:27 +03:00
sh 44ab1318ee
docs(readme): add shell script for cleaning files (#20) 2022-03-17 11:47:33 +03:00
Orhun Parmaksız 08dc063a7a
docs(readme): add installation instructions for Arch Linux 2022-03-13 21:13:31 +03:00
Orhun Parmaksız fda6f91211
style(readme): update the formatting of example shell function 2022-03-12 00:03:37 +03:00
Orhun Parmaksız f3859d2857
docs(readme): make the heading sizes consistent 2021-11-07 17:25:42 +03:00
Orhun Parmaksız a2de1c3334
feat(config): hot-reload the configuration 2021-11-07 16:06:57 +03:00
Orhun Parmaksız 7a6842e181
feat(paste): support pasting files from remote URLs 2021-11-06 23:55:55 +03:00
Orhun Parmaksız e29df82899
docs(readme): update the roadmap 2021-10-12 19:36:41 +03:00
Orhun Parmaksız c08fd29a45
feat(paste): make duplicate uploads optional (#7) 2021-10-12 19:35:06 +03:00
Orhun Parmaksız 6f050e606c
docs(readme): add installation section 2021-09-19 01:49:59 +03:00
Orhun Parmaksız 43961d1633
docs(readme): mention the standalone CLI tool 2021-09-19 01:46:50 +03:00
Orhun Parmaksız 6c10d381b4
docs(readme): prefix commands with '$' 2021-09-19 01:27:14 +03:00
orhun 929f664b09
docs(readme): add cleanup script to README.md 2021-08-27 22:19:40 +03:00
orhun 38a0144ad7
docs(readme): update README.md about expiring links 2021-08-27 21:12:18 +03:00
orhun 0138cff440
docs(readme): update README.md about one shot file uploads 2021-08-26 23:13:32 +03:00
orhun eaa8b09cd2
chore(docker): share the config file between host and container 2021-08-09 23:27:35 +03:00
orhun d0abe50679
docs(readme): mention MIME type overriding and blacklisting 2021-08-09 23:12:51 +03:00
orhun 11482ff59f
docs(readme): mention URL shortening 2021-08-04 17:49:57 +03:00
orhun a0b9424b94
docs(readme): use https scheme for example URLs 2021-07-27 16:20:01 +03:00
orhun 466a87b8d2
docs(readme): update nginx example 2021-07-27 16:16:31 +03:00
orhun e178475971
docs(readme): update auth token example 2021-07-27 15:48:21 +03:00
orhun 3577c0ede5
docs(readme): update the releases page link 2021-07-27 13:25:47 +03:00