作者 lyh

gx

@@ -83,8 +83,7 @@ class AmazonS3Service @@ -83,8 +83,7 @@ class AmazonS3Service
83 if ($file_handle === false) { 83 if ($file_handle === false) {
84 return '无法打开文件'; 84 return '无法打开文件';
85 } 85 }
86 - $file_stats = fstat($file_handle);  
87 - $content_length = $file_stats['size']; 86 + $content_length = filesize($files);
88 $result = $this->s3->putObject([ 87 $result = $this->s3->putObject([
89 'Bucket' => $this->bucket, 88 'Bucket' => $this->bucket,
90 'Key' => $key, 89 'Key' => $key,