Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image sending bug #102

Open
grigori-gru opened this issue Jun 1, 2018 · 3 comments
Open

Image sending bug #102

grigori-gru opened this issue Jun 1, 2018 · 3 comments

Comments

@grigori-gru
Copy link
Contributor

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.

@jabolina
Copy link

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
Copy link

jabolina commented Sep 3, 2018

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.

@ajlucero
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants