]> source.dussan.org Git - gitea.git/commit
Preserve file size when creating attachments (#23406)
authorPeter <peter.kurfer@googlemail.com>
Sun, 12 Mar 2023 07:48:07 +0000 (08:48 +0100)
committerGitHub <noreply@github.com>
Sun, 12 Mar 2023 07:48:07 +0000 (03:48 -0400)
commitc6f50297084ebd9ec8b8c25370b9b963167274eb
tree505bc97acfadf318fd947e70f0ec4bae4ccbcc3e
parent023521b016d004ca185f0c4e2d80d30e2722fa81
Preserve file size when creating attachments (#23406)

When creating attachments (issue, release, repo) the file size (being
part of the multipart file header) is passed through the chain of
creating an attachment to ensure the MinIO client can stream the file
directly instead of having to read it to memory completely at first.

Fixes #23393

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
routers/api/v1/repo/issue_attachment.go
routers/api/v1/repo/issue_comment_attachment.go
routers/api/v1/repo/release_attachment.go
routers/web/repo/attachment.go
services/attachment/attachment.go
services/attachment/attachment_test.go
services/mailer/incoming/incoming_handler.go
services/release/release_test.go