readFileSync from an URL for Twitter media - node.js
I need to use an URL to import a media to Twitter. But I can't figure out how to use an URL without having to download the image, save it temporarily on the server and deleted after... I'm using Google Cloud to store the images that's why I can't access it directly. That's what I'm trying to do : var data = require('fs').readFileSync('https://www.example.com/image.png'); //Create the Twitter client const client = new Twitter({ consumer_key: process.env.consumer_key_dev, consumer_secret: process.env.consumer_secret_dev, access_token_key: user.val().access.token, access_token_secret: user.val()