Angularjs streaming-s3在live-NodeJ上不起作用
我使用的是streaming-s3节点模块,在我的本地机器上运行良好 但在现场,它似乎不起作用。我在live server上启用了https 如果我在live server上禁用了https,我的上传工作正常 这是我的密码Angularjs streaming-s3在live-NodeJ上不起作用,angularjs,node.js,amazon-s3,ng-file-upload,Angularjs,Node.js,Amazon S3,Ng File Upload,我使用的是streaming-s3节点模块,在我的本地机器上运行良好 但在现场,它似乎不起作用。我在live server上启用了https 如果我在live server上禁用了https,我的上传工作正常 这是我的密码 exports.uploadFile = function (fileReadStream, awsHeader, cb) { //set options for the streaming module var options = { co
exports.uploadFile = function (fileReadStream, awsHeader, cb) {
//set options for the streaming module
var options = {
concurrentParts: 2,
waitTime: 20000,
retries: 2,
maxPartSize: 10 * 1024 * 1024
};
//call stream function to upload the file to s3
var uploader = new streamingS3(fileReadStream, config.aws.accessKey, config.aws.secretKey, awsHeader, options);
//start uploading
uploader.begin();// important if callback not provided.
// handle these functions
uploader.on('data', function (bytesRead) {
console.log(bytesRead, ' bytes read.');
});
uploader.on('part', function (number) {
console.log('Part ', number, ' uploaded.');
});
// All parts uploaded, but upload not yet acknowledged.
uploader.on('uploaded', function (stats) {
console.log('Upload stats: ', stats);
});
uploader.on('finished', function (response, stats) {
console.log(response);
logger.log('info', "UPLOAD ", response);
cb(null, response);
});
uploader.on('error', function (err) {
console.log('Upload error: ', err);
logger.log('error', "UPLOAD Error: ", err);
cb(err);
});
你知道这个吗
谢谢您需要在客户端中启用ssl,添加
sslEnabled
选项,如下所示
var options = {
sslEnabled: true,
concurrentParts: 2,
waitTime: 20000,
retries: 2,
maxPartSize: 10 * 1024 * 1024
};
您可以检查更多有关您可以使用的选项的信息,您需要在客户端中启用ssl,添加如下
sslEnabled
选项
var options = {
sslEnabled: true,
concurrentParts: 2,
waitTime: 20000,
retries: 2,
maxPartSize: 10 * 1024 * 1024
};
您可以检查更多有关您可以使用的选项的信息您的ssl是通过节点还是通过代理启用的?我已经使用节点启用了ssl。我也在服务器上安装了SSL证书。您是否检查了
fileReadStream
在使用SSL时是否为空或结束?仅从上面的代码很难说。尝试输入更多信息。我已检查是否正在fileReadStream中获取数据。日志中显示了什么?有错误吗?哪些回调没有触发?您的ssl是通过节点启用的还是通过代理启用的?我已经使用节点启用了ssl。我也在服务器上安装了SSL证书。您是否检查了fileReadStream
在使用SSL时是否为空或结束?仅从上面的代码很难说。尝试输入更多信息。我已检查是否正在fileReadStream中获取数据。日志中显示了什么?有错误吗?哪些回调没有触发?您的ssl是通过节点启用的还是通过代理启用的?我已经使用节点启用了ssl。我也在服务器上安装了SSL证书。您是否检查了fileReadStream
在使用SSL时是否为空或结束?仅从上面的代码很难说。尝试输入更多信息。我已检查是否正在fileReadStream中获取数据。日志中显示了什么?有错误吗?哪些回调不会触发?