나는 파일을 업로드하려고하는데, "각도 파일 업로드"를 사용하고 있습니다. 연결 MongoDB를 위해 파일을 전송하려고하지만, 그것은 연결을 보여줍니다 순 :: ERR_INSECURE_RESPONSE각도 파일 업로드로 MongoDb에 파일을 보내고 보내는 방법
mongodb.log 로그 파일에서
작업이 완료
불을 지르고에서이 오류를 제공합니다2014-11를 -09T11 : 57 : 05.512 + 0400 I NETWORK [initandlisten] 연결
2014-11-09T11 (현재 접속 한 오픈) xxx.xxx:53749 # 2로부터 접수 : 57 : 05.524 + 0400 I NETWORK [CONN2 ] 연결 종료 xxx.xxx : 5 3749 (현재 0 개의 연결이 열려 있습니다)
또한 ssl certificate를 생성하여 사용했습니다.
내 각도 JS 코드는 다음과 같습니다
$scope.onFileSelect = function($files) {
//$files: an array of files selected, each file has name, size, and type.
for (var i = 0; i < $files.length; i++) {
var $file = $files[i];
$upload.upload({
url: "https://localhost:27017/mydb",
file: $file,
progress: function(e){ console.log("Progress: ");}
}).then(function(data, status, headers, config) {
// file is uploaded successfully
console.log("File Uploaded : "+ data);
});
}
};