Closed Linch1 closed 4 years ago
When uploading, you need to pass a file
to the method.
@Nerixyz I’m already doing it, i’ve followed the example. If i upload a video it works correctly but with an image it doesn’t
@Linch1 You are not. You are passing img
but you are supposed to pass file
.
@Nerixyz Sry but actually i'm not understanding what you are saying... What do you mean by saying that i have to pass file
not img
?
I saw from example that you have to pass in the function the image readed by the function readFileAsync = promisify(fs.readFile)
, and the img
vaiable contains that, i have not a file
var to pass at the function.
I have to do it in this way ?
const img = await readFileAsync('datas/downloads/video/funis_sweets&&&2cc57d14&oe=5E86625D.jpg');
// uploading to the story
const resStory = await ig.publish.story({
file: img
});
@Linch1 Your latest code should work.
Yes it worked thanks!
Form
Question
I'm trying to upload ig stories using the api but i'm facins some problems. Uploading a story raise 'Cannot read property 'indexOf' of undefined' ( I'm using "electron": "^6.1.5"). I put only the relevand code here below
CODE
CONSOLE DEBUG