我正在尝试使用以下调用上传文件
RestClient::Request.execute(method: :post, url: Paperclip::Storage::Http::FILE_UPLOAD_LOCATION, password: Paperclip::Storage::Http::FILE_UPLOAD_KEY, timeout: 8, open_timeout: 8, payload: self.file)
其中 self.file 是一个 ActionDispatch::Http::UploadedFile 对象,但我收到以下错误:
NoMethodError: undefined method `closed?' for #<ActionDispatch::Http::UploadedFile:0xa8bd300>
超时上传文件的正确方法是什么?