I have a strange situation where I need to send some image data to a php file from within the angular application itself... yes, the php file resides in the angular docroot.
Every time I try to upload image data (from the browser) to this file, the application doesn't seem to go through to it. Instead, I get back a response that is the entire index.html code. I understand that this is probably because I am using ui.router
to handle my routing, and have it defaulting to index.html. However, I have tried to add app.use("/upload.php", express.static(path.join(__dirname, '/upload.php')));
to my node server script... in hope that the /upload.php
url would be succesfully routed... however, I still only get back index.html code and it seems that the upload.php file is never reached.
Can anybody provide any hinters? Much appreciated.