Hi,
I have a nodeJs, ExpressJS and EJS Stack working.
EJS ist called like this:
app.register('.html', require('ejs'));
app.set('view engine', 'html');
If I render an html file everything works fine.
If I try to render an html file with an image tag, the image is there
but is will not be shown.
I get they Error : "Resource interpreted as Image but transferred with
MIME type text/html"
--> the problem seems to be that the image also gets the Content-Type
text/html.
How can i get this to work?
I allready tried to have something like this:
"
app.post('/public/img', function(req, res, next){
console.log("try to load an image");
if (
req.is('image/png')) {
// do something
} else {
next();
}
});
"
This isn't working at all.
Any Suggestions???
thx
\akaRufus