We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b93bef2 commit c719e8fCopy full SHA for c719e8f
lib/yt/models/video.rb
@@ -1,3 +1,4 @@
1
+require 'open-uri'
2
require 'yt/models/resource'
3
4
module Yt
@@ -549,7 +550,7 @@ def claim
549
550
# @raise [Yt::Errors::RequestError] if path_or_url is not a valid path
551
# or URL.
552
def upload_thumbnail(path_or_url)
- file = URI.parse(path_or_url).open rescue StringIO.new
553
+ file = URI.open(path_or_url)
554
session = resumable_sessions.insert file.size
555
556
session.update(body: file) do |data|
0 commit comments