我正在使用Glip发布消息。我可以发布图片从Glip UI,但我没有看到一个选项,以张贴图像。有人知道怎么做吗?
发布于 2018-04-12 13:50:27
如果有人看到这个示例,下面是我所做的(使用Node和RingCentral SDK):
var RC = require('ringcentral');
var fs = require('fs');
var FormData = require('form-data');
// {login to Glip and generate the platform object (https://github.com/ringcentral/ringcentral-js)}
var formData = new FormData();
formData.append('attachment', fs.createReadStream('image.png'));
platform
.send({
method: 'POST',
url: '/glip/files',
body: formData,
query: {
groupId: '1234', // whatever group you want to post to
}
})
.then(function(){
console.log('file uploaded');
})
.catch(function(e){
console.log(e.message);
});https://stackoverflow.com/questions/45703586
复制相似问题