mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-9556 Added ability to upload files without a multipart request (#8306)
* MM-9556 Added ability to upload files without a multipart request * MM-9556 Handled some unusual test behaviour
This commit is contained in:
@@ -447,6 +447,18 @@ func (c *Context) RequireFileId() *Context {
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Context) RequireFilename() *Context {
|
||||
if c.Err != nil {
|
||||
return c
|
||||
}
|
||||
|
||||
if len(c.Params.Filename) == 0 {
|
||||
c.SetInvalidUrlParam("filename")
|
||||
}
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Context) RequirePluginId() *Context {
|
||||
if c.Err != nil {
|
||||
return c
|
||||
|
||||
Reference in New Issue
Block a user