fix the build

Checking size for a file object directly will cause issue if it is a closed stream
This commit is contained in:
Vinoth Kannan 2019-01-04 13:25:11 +05:30
parent 9c91e68351
commit 82d7f9ce5e

View File

@ -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