Fixed error message displayed for FileWillBeUploaded rejections (#10535)
#### Summary Fixed the error message displayed when an uploading file gets rejected by a plugin's FileWillBeUploaded hook. #### Ticket Link https://mattermost.atlassian.net/browse/MM-14803
Этот коммит содержится в:
@@ -648,8 +648,8 @@ func (t *uploadFileTask) runPlugins() *model.AppError {
|
||||
replacementInfo, rejectionReason := hooks.FileWillBeUploaded(pluginContext,
|
||||
t.fileinfo, t.newReader(), buf)
|
||||
if rejectionReason != "" {
|
||||
rejectionError = t.newAppError("api.file.upload_file.read_request.app_error",
|
||||
rejectionReason, http.StatusBadRequest)
|
||||
rejectionError = t.newAppError("api.file.upload_file.rejected_by_plugin.app_error",
|
||||
rejectionReason, http.StatusForbidden, "Reason", rejectionReason)
|
||||
return false
|
||||
}
|
||||
if replacementInfo != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user