我需要上傳多個大文件(幾GB)到AWS S3服務器。我寫了基本代碼,但它給錯誤 -在.Net(asp.net核心)上傳大文件到aws S3服務器
HTTP Error 502.3 - Bad Gateway
The specified CGI application encountered an error and the server terminated the process.
可能是由於超時。 那麼,是否有任何完美的方式來上傳大文件到S3。 我使用下面的代碼 -
TransferUtility fileTransferUtility = new TransferUtility(this._s3Client);
TransferUtilityUploadRequest fileTransferUtilityRequest = new TransferUtilityUploadRequest
{
BucketName = s3BucketName,
FilePath = filePath,
PartSize = 6291456,
Key = key,
CannedACL = S3CannedACL.PublicRead
};
fileTransferUtilityRequest.UploadProgressEvent += FileTransferUtilityRequest_UploadProgressEvent;
fileTransferUtility.Upload(fileTransferUtilityRequest);
你檢查IIS中的命令行日誌或ASPNET日誌,以確認這是一個超時問題? –