fix the build

fix the build

Checking size for a file object directly will cause issue if it is a closed stream

diff --git a/lib/s3_helper.rb b/lib/s3_helper.rb
index 427b6ce..1ecd822 100644
--- a/lib/s3_helper.rb
+++ b/lib/s3_helper.rb
@@ -28,7 +28,7 @@ class S3Helper
     obj = s3_bucket.object(path)
 
     etag = begin
-      if File.size(file) >= Aws::S3::FileUploader::FIFTEEN_MEGABYTES
+      if File.size(file.path) >= Aws::S3::FileUploader::FIFTEEN_MEGABYTES
         options[:multipart_threshold] = Aws::S3::FileUploader::FIFTEEN_MEGABYTES
         obj.upload_file(file, options)
         obj.load

GitHub
sha: 82d7f9ce