Mattermost Peer-to-Peer Forum

Websoket "posted" event not contains "file_ids"



Hello everyone, Websoket “posted” event not contains “file_ids”
Mattermost 5.9

Steps to reproduce

headers = new Headers();
headers.append(‘Content-Type’, ‘application/json’);
headers.append(‘Authorization’, token`)

fetch(${apiUrl}/posts", {
method: ‘POST’,
body: JSON.stringify({
“channel_id”: channel_id,
“message”: “message”
“file_ids”: […some array of string]

Expected behavior

expected something like this (from
post: “{

Observed behavior

but get
post: “{


Same in fetch response, no file_ids:
channel_id: “6odgcqrpybg7879y1gk59pt7h”
create_at: 1555514666584
delete_at: 0
edit_at: 0
hashtags: “”
id: “eqp7wne44890xkf41s85t4hknc”
is_pinned: false
message: “”
metadata: {}
original_id: “”
parent_id: “”
pending_post_id: “”
props: {}
root_id: “”
type: “”
update_at: 1555514666593
user_id: “repsxkurs7899fubnf4osu9uyr”


Hi @Sveta,

Do you see issues with uploading files in channels?


No, everything is loaded into the database.

This request works fine and returns the expected file_ids:
“curl -F ‘files=@PATH/TO/LOCAL/FILE’ \\n-F ‘channel_id=CHANNEL_ID’ \\n–header ‘authorization: Bearer c49adc55z3f53ck7xtp8ebq1ir’\n”

1 Like

I want to clarify that the files are uploaded to the database, but I cannot attach them to the post. Since post creates without file_ids information. And the file information is missing in websocket “posted” event.


Hi @Sveta, do you see this issue only on


I see this error only on my local example. On everything is working, but there is another version - 5.7.0 (
I have 5.9), maybe this is the case.


Hi @Sveta,

Would you be open to doing a quick test at to see if our community server behaves as you expect? It’s currently on v5.10 version.


v5.10 working OK