orhun / rustypaste

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

file not found, even though on server and not expired #218

Closed tessus closed 6 months ago

tessus commented 8 months ago

Steps to reproduce

  1. set delete_expired_files = { enabled = true, interval = "1h" } in config.toml
  2. no random filenames in config.toml
  3. start rustypaste
  4. echo "test content" >test.txt
  5. curl -F "file=@test.txt" -H "expire:1s" http://127.0.0.1:8000
  6. curl -F "file=@test.txt" -H "expire:1s" http://127.0.0.1:8000
  7. curl -F "file=@test.txt" -H "expire:1min" http://127.0.0.1:8000
  8. curl http://127.0.0.1:8000/test.txt

Expected

test content

What happened

file is not found or expired :(

However, the file is shown when using the list endpoint with the correct expiry date (1 min in the future).