I'm trying to upload a file through the SDK but having issues. Currently I'm getting a success with the code below:
const res = await client.files.upload({
channel: 'CHANNEL',
file: Buffer.from('hello'),
filename: 'test.txt',
filetype: 'text/plain',
});
The response looks something like:
{ ok: true,
file:
{ id: 'FIDTM4IDM',
created: 1568847491,
timestamp: 1568847491,
name: 'test.txt',
title: 'test',
mimetype: 'text/plain',
filetype: 'text',
pretty_type: 'Plain Text',
...
...
}
}
However nothing is showing up in the channel when I check. I know things are configured correctly because I can post messages to the channel.
Hey there @captDaylight , use 'channels' instead of 'channel'
It seems like @smashah's suggestion solved this issue. Okay to close?
Allow me to close this issue but please feel free to reopen or write in if you have anything further to mention here.
Most helpful comment
Hey there @captDaylight , use 'channels' instead of 'channel'