I am uploading file image/video but in nodejs it is only working if I upload local image/video and not if I download it from some url. Code: ‘’’
const downloadImageFromUrl = async () => { const video = await axios.get(https://i.imgur.com/rfYwI5n.mp4https://i.imgur.com/rfYwI5n.mp4, { responseType: 'arraybuffer' }); const buffer = Buffer.from(video.data, 'binary').toString('base64'); return buffer; } ‘’’ Now is above code different if I read mp4 or png jpeg file from local using fs.readFile in nodejs??
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Reactiflux
The best chat community for professionals using React or React Native