Close#13239
Implement the same behaviour as the gitea_uploader
### Tests for Go changes
(can be removed for JavaScript changes)
- I added test coverage for Go changes...
- [X] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
### Documentation
- [X] I did not document these changes and I do not expect someone else to do it.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13257
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>