Node.js Skipper-S3文件上载在windows中不起作用
我正在使用=> 节点4.2.6 sailsjs 0.12.1 前端代码=>Node.js Skipper-S3文件上载在windows中不起作用,node.js,amazon-s3,sails.js,Node.js,Amazon S3,Sails.js,我正在使用=> 节点4.2.6 sailsjs 0.12.1 前端代码=> function uploadFile(file, url, callback){ var fd = new FormData(); fd.append('image', file); $http.post(CONSTANTS.API_URL+url, fd, { transformRequest: angular.id
function uploadFile(file, url, callback){
var fd = new FormData();
fd.append('image', file);
$http.post(CONSTANTS.API_URL+url, fd, {
transformRequest: angular.identity,
headers: {'Content-Type': undefined}
})
.then(function (response) {
callback(response);
}, function (response) {
callback(response);
});
}
后端:
fileUploader(req, 'image', function(err, uploadedFiles) {
if (err || (!(uploadedFiles[0]))) {
return res.json(400, err);
} else {
var url = uploadedFiles[0].extra.Location;
if (url) {
sails.models.person.update(personId, { 'avtar': url },
function(err, updatedUrl) {
if (err || !updatedUrl) {
return res.json(500, { 'message': 'Unable to upload the Profile Pic' })
} else {
return res.ok({ profilePicUrl: url });
}
})
}else{
return res.json(500, { 'message': 'Unable to upload the Profile Pic!' })
}
};
});
我正在尝试使用skipper-S3在AWS S3中上载图像。它在MacOSX中运行良好(10.11.4)
但是,当我试图从windows上载图像时,出现了错误:
[错误:eNote:没有此类文件或目录,请打开'C:\Users\myProject\.tmp\s3上载部件队列\mpu-\mylib\d9c7a41c-3407-4891-9ce4-b42c32d6feb2.jpg-6736-1463035484420-1']
我认为这与目录系统有关
是skipper-s3错误还是我做错了什么