Moving file response functionality to shared folder (#22226)
* Moving file response functionality to shared folder * Linter fixes * Added the attachment serve to shared folder * Removed the unwanted logs * import fixes * Linter fixes * License added * Moved UnsafeContentTypes and MediaContentTypes from api4 --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3ae70591d0
Коммит
825b281f36
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/audit"
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/mlog"
|
||||
"github.com/mattermost/mattermost-server/v6/shared/web"
|
||||
)
|
||||
|
||||
func (api *API) InitCloud() {
|
||||
@@ -647,7 +648,7 @@ func getSubscriptionInvoicePDF(c *Context, w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
writeFileResponse(
|
||||
web.WriteFileResponse(
|
||||
filename,
|
||||
"application/pdf",
|
||||
int64(binary.Size(pdfData)),
|
||||
|
||||
Ссылка в новой задаче
Block a user