You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I send with the webhook the image file encoded in Base64 but I never send it with the bot, how i can solve this?, I use Express Js Response image
/*This is my webhook code//
const express = require('express');
const app = express();
const port = 3031;
const files = require("./images/files")
app.use(((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*"); // update to match the domain you will make the request from
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type,Accept");
next();
}))
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I send with the webhook the image file encoded in Base64 but I never send it with the bot, how i can solve this?, I use Express Js
Response image
/*This is my webhook code//
const express = require('express');
const app = express();
const port = 3031;
const files = require("./images/files")
app.use(((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*"); // update to match the domain you will make the request from
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type,Accept");
next();
}))
app.post('/api/getting-files',((req, res) =>
res.send(
[{
"text": "Imagenes",
"type": "message",
"files": [
{
"name":"1.jpg",
"file":files.photo1
},
{
"name":"2.jpg",
"file":files.photo2
},
{
"name":"3.jpg",
"file":files.photo3
},
{
"name":"4.jpg",
"file":files.photo4
},
{
"name":"5.jpg",
"file":files.photo5
},
{
"name":"6.jpg",
"file":files.photo6
},
{
"name":"7.jpg",
"file":files.photo7
},
{
"name":"8.jpg",
"file":files.photo8
},
{
"name":"9.jpg",
"file":files.photo9
},
{
"name":"10.jpg",
"file": files.photo10
},
{
"name":"11.jpg",
"file":files.photo11
}
]
}
])
));
app.listen(port)
Beta Was this translation helpful? Give feedback.
All reactions