Skip to content

Commit c719e8f

Browse files
authored
Fix upload_thumbnail from path (#449)
1 parent b93bef2 commit c719e8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/yt/models/video.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require 'open-uri'
12
require 'yt/models/resource'
23

34
module Yt
@@ -549,7 +550,7 @@ def claim
549550
# @raise [Yt::Errors::RequestError] if path_or_url is not a valid path
550551
# or URL.
551552
def upload_thumbnail(path_or_url)
552-
file = URI.parse(path_or_url).open rescue StringIO.new
553+
file = URI.open(path_or_url)
553554
session = resumable_sessions.insert file.size
554555

555556
session.update(body: file) do |data|

0 commit comments

Comments
 (0)