diff --git a/lib/slack/web/api/endpoints/files.rb b/lib/slack/web/api/endpoints/files.rb index 1f9b3680..ac810f2a 100644 --- a/lib/slack/web/api/endpoints/files.rb +++ b/lib/slack/web/api/endpoints/files.rb @@ -144,6 +144,7 @@ def files_sharedPublicURL(options = {}) # @see https://api.slack.com/methods/files.upload # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json def files_upload(options = {}) + options = options.merge(filename: 'file') if options[:file] && !options[:filename] post('files.upload', options) end end