我试图从我的 S3 服务器获取一些图像,但其中一些具有非常大的 URL。即使 URL 很大,我如何下载这些图像?
代码:
//download the object from the bucket
sourceS3.getObject(getparamsOrig, function(gerr, s3obj) {
if (gerr) {
//if there is problem just print to console and move on.
console.log('Download issue');
console.log(gerr);
return;
}
});
Run Code Online (Sandbox Code Playgroud)
调试:
DEBUG [03314cb6] Download issue
DEBUG [03314cb6] { [KeyTooLongError: Your key is too long]
DEBUG [03314cb6] message: 'Your key is too long',
DEBUG [03314cb6] code: 'KeyTooLongError',
DEBUG [03314cb6] time: Tue Apr 21 2015 17:10:51 GMT-0400 (EDT),
DEBUG [03314cb6] statusCode: 400,
DEBUG [03314cb6] retryable: …Run Code Online (Sandbox Code Playgroud)