I want to use R to update thumbnails of my youtube videos.I'm following the google documentation, but I get the following error:
"The request does not include the image content."The curent status of my code is the following:
library(httr)library(tuber)video.id <- [ID]thumbnail.path <- [path]youtube.client.id <- [ID]youtube.client.secret <- [secret]yt_oauth( app_id = youtube.client.id, app_secret = youtube.client.secret, scope = 'partner')req <- POST("https://www.googleapis.com", path = paste0("youtube/v3/thumbnails/set","?videoId=", video.id ), body = httr::upload_file(thumbnail.path), config(token = getOption("google_token")))I have similar queries for other API call (using PUT or GET), and they work.I think the issue is around the upload_file, but cannot find what should be the solution.
How can I fix that?Thanks in advance