diff --git a/lib/yt/models/account.rb b/lib/yt/models/account.rb index c7512f04..322d6582 100644 --- a/lib/yt/models/account.rb +++ b/lib/yt/models/account.rb @@ -74,7 +74,7 @@ def avatar_url # @option params [Boolean] :self_declared_made_for_kids The video’s made for kids self-declaration. # @return [Yt::Models::Video] the newly uploaded video. def upload_video(path_or_url, params = {}) - file = URI.parse(path_or_url).open + file = URI.open(path_or_url) session = resumable_sessions.insert file.size, upload_body(params) session.update(body: file) do |data|