mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:15:05 +08:00
fix the build
Checking size for a file object directly will cause issue if it is a closed stream
This commit is contained in:
parent
9c91e68351
commit
82d7f9ce5e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user