Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

express octet stream

app.get((req, res, next) => {
  res.setHeader('Content-Type', 'application/octet-stream');
  res.sendFile('/file/to/be/downloaded.ext');
  res.status(200);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: flatten nested object js 
Javascript :: Javascript screenshot in video 
Javascript :: vuejs alerts 
Javascript :: parseint javascript 
Javascript :: flutter webview enable javascript 
Javascript :: generate express app 
Javascript :: javascript map 
Javascript :: js select keys from object 
Javascript :: change class of icon using jquery 
Javascript :: javascript connect metamask 
Javascript :: rerender a vue component 
Javascript :: how to check if something is array javascript 
Javascript :: react toastify is not working 
Javascript :: reverse sort array of objects 
Javascript :: js change h 
Javascript :: javascript date get next 15 minutes 
Javascript :: redux update item in array 
Javascript :: find max value in javascript 
Javascript :: 1 dollar in rupees 
Javascript :: jquery cheat sheet 
Javascript :: how to install nide js in ubuntu 
Javascript :: javascript es6 class 
Javascript :: javascript closure 
Javascript :: post request with data and headers 
Javascript :: for in loop js 
Javascript :: How can I check if an object is an array 
Javascript :: javascript array read object value in array 
Javascript :: reload parent window from prompt 
Javascript :: v-for only getting one first value vuejs 
Javascript :: ${} js 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =