diff --git a/lib/google/api_client/media.rb b/lib/google/api_client/media.rb index 8cba0a105..45726cded 100644 --- a/lib/google/api_client/media.rb +++ b/lib/google/api_client/media.rb @@ -100,6 +100,14 @@ module Google return @expired end + ## + # Check if upload is resumable. That is, neither complete nor expired + # + # @return [TrueClass, FalseClass] True if upload can be resumed + def resumable? + return !(self.complete? or self.expired?) + end + ## # Convert to an HTTP request. Returns components in order of method, URI, # request headers, and body