1

I'm making a chat applicatin using socket.io. I want user to be able to send image and this image will be uploaded to cloudinary then saved to mongodb. First i get base64 string of image but this base64 text could not send via socket.io. So i converted base64 to buffer then sent this via socket.io but now i dont know what to do. Do you have any tips? Why base64 text could not sent via socket.io?

MY CODE WHEN I TRIED TO SEND AS BASE 64

socket.emit("send message", here will be the result of file reader)
3
  • stackoverflow.com/questions/59478402/… Commented Apr 29, 2021 at 23:27
  • @SardorekAminjonov when i try to send base64 text with socket.io it can't be send. Maybe it's because text is too big. What should I do? Commented Apr 30, 2021 at 10:22
  • Images are not too big, usually. So, it should actually work. Can you paste the code? Or it is hard to know what might be going? Commented Apr 30, 2021 at 13:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.