Node JS
Friday, 22 November 2019
Handle Audio Streaming from GridFS / Express
Hello, everyone. I have created an express route that allows me to retrieve an audio file stored in MongoDB via GridFS. The problem is to be able to consume this endpoint api. On the client side, when I try to retrieve the file via the HTML tag
, it works. However, I have to send headers to authenticate my request. So I have to use fetch() or axios or something, but the problem I have is that I can't get the file back little by little, I have to wait 30 seconds and the whole file comes all at once. I tried to follow this: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams, but the result was the same.Can someone help me? I provide you with my server codehttps://preview.redd.it/ozudzvfti9041.png?width=1160&format=png&auto=webp&s=c7a48ddfb4154a9403b34f8ea9f27bbb481e3a6a
Submitted November 22, 2019 at 04:15PM by louissalvet
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment