skype-http icon indicating copy to clipboard operation
skype-http copied to clipboard

Image sending bug

Open grigori-gru opened this issue 7 years ago • 3 comments

Hello!

Link to SkPy issue

It's seems to me the best solution should be to add "X-Client-Version": "0/0.0.0.0" to headers in send-image.js. It helps me in my project, I can make pull request with it. But maybe there is some other problems which i can't catch.

grigori-gru avatar Jun 01 '18 07:06 grigori-gru

Hi, the release in npm (0.0.15), still works to send image files? And how can I achieve this, I know that the object img is:

{
  file: string,
  name: string
}

The file value can be a base 64 string made from an image?

In my application I'm using like this:

api.sendImage({
    file: base64,
    name: Math.random().toString(36).substr(2, 15)
}, messageObj.sendTo)
    .then(r => console.log(`Send image from server to Skype ${JSON.stringify(r)}`))
    .catch(e => console.error(`Error while sending media to Skype ${JSON.stringify(e)}`));

But aways end in the catch with:

Error while sending media to Skype {"name":"send-image","data":{}}

At the moment, the lib still works or I'm doing something wrong? Thanks!

jabolina avatar Aug 30 '18 18:08 jabolina

Created a pull-request adding the header. If someone want to send image either, the img object is:

{
  file: "/path/to/my/image.png",
  name: "image.png"
}

Without the header the same problem happened: {"name":"send-image","data":{}} With the header, the image was sent.

jabolina avatar Sep 03 '18 12:09 jabolina

i got image working by adding "X-Client-Version": "0/0.0.0.0" but i coudnt enlarge or even download the image,

ajlucero avatar Jul 19 '19 08:07 ajlucero