Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express access static files in post request

app.use(staticPath, function(req, res, next){
if ('POST' != req.method){
    next()
}else{
    req.method = 'GET'
    next()
}
})
app.use(staticPath, express.static('./static'))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #express #access #static #files #post #request
ADD COMMENT
Topic
Name
7+3 =