You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var express = require('express');
var app = express.createServer();
var path = require('path');
var AWS = require('aws-sdk');
var bodyParser = require('body-parser');
var multiparty = require('connect-multiparty'),
multipartyMiddleware = multiparty();
Node.js
var express = require('express');
var app = express.createServer();
var path = require('path');
var AWS = require('aws-sdk');
var bodyParser = require('body-parser');
var multiparty = require('connect-multiparty'),
multipartyMiddleware = multiparty();
app.use(express.static(path.join(__dirname)));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use('/',routes);
app.use(function(req, res, next) { //allow cross origin requests
res.setHeader("Access-Control-Allow-Methods", "POST, PUT, OPTIONS, DELETE, GET");
res.header("Access-Control-Allow-Origin", "IP");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
app.get('/', function(req, res){
res.sendfile('index.html', { root: __dirname + "/" }) ;
res.end();
});
app.post('/myapp/photoUplad', multipartyMiddleware, function(req, res) {
console.log(app.BucketName);
console.log(req.body);
console.log('-------------------');
console.log(req.files.file);
});
Angular controller
http.post('/myapp/photoUplad', JSON.stringify({ keyname: keynameq })).then(function(data) {
Web.config
NOTE :404 Error any help on this
The text was updated successfully, but these errors were encountered: