html post后404,javascript - POST http://localhost:3000/ 404 (Not Found) - Stack Overflow

I'm working on web file browser with upload function. I'm using Angular File Upload directive and angular web file browser.

First off I've downloaded file web browser and configured it.

Second I've downloaded file upload directive and did everything step by step and my page works perfect

but when I'm trying to upload something I'm getting

FileUploader.js:479 POST http://localhost:3000/ 404 (Not Found)

I understand that FileUploader.js can't find upload.php file, but I put it to the root folder and provided path:

var uploader = $scope.uploader = new FileUploader({

url: 'upload.php'

});

this is how it looks:

angular/app.js:

(function() {

'use strict';

window.app = angular.module('fileBrowserApp', ['ngRoute', 'jsTree.directive', 'angularFileUpload']).

config(['$routeProvider',

function($routeProvider) {

$routeProvider.

when('/', {

templateUrl: '../partials/home.html',

controller: 'HomeCtrl'

}).

otherwise({

redirectTo: '/home'

});

}

]);

window.app.directive('attachable', function(FileUploader) {

return {

restrict: 'E',

replace: true,

templateUrl:'../partials/upload.html',

link: function(scope, element, attrs) {

scope.uploader = new FileUploader();

}

}

})

;

}());

server/app.js

(function() {

'use strict';

var express = require('express');

var path = require('path');

var logger = require('morgan');

var cookieParser = require('cookie-parser');

var bodyParser = require('body-parser');

var fs = require('fs-extra');

va

你可能感兴趣的:(html,post后404)