diff --git a/lib/artifactory/resources/artifact.rb b/lib/artifactory/resources/artifact.rb
index <HASH>..<HASH> 100644
--- a/lib/artifactory/resources/artifact.rb
+++ b/lib/artifactory/resources/artifact.rb
@@ -435,7 +435,7 @@ module Artifactory
     # @return [Resource::Artifact]
     #
     def upload(key, path_or_io, path, properties = {}, headers = {})
-      file = if path_or_io.is_a?(File)
+      file = if respond_to?(:read)
                path_or_io
              else
                File.new(File.expand_path(path_or_io))
Artifact.upload supports upload of any kind of IO object.