【问题标题】:Invalid thumbnail URL when uploading a video on dailymotion api在 dailymotion api 上上传视频时缩略图 URL 无效
【发布时间】:2019-01-03 13:09:10
【问题描述】:

我使用dailymotion api上传视频:https://api.dailymotion.com/me/videos 在大多数情况下,它运作良好。但有时,我有这个错误: {"error":{"more_info":"https://developer.dailymotion.com/api#error-codes","code":400,"message":"无效的缩略图 URL","type":"invalid_parameter "}}

当我使用相同的参数再次上传视频时,它可以工作。

这是我的一段 C# 代码:

    var dico = new Dictionary<string, string>();
    dico.Add("access_token", accessToken);
    dico.Add("url", config.Url);
    if (!string.IsNullOrEmpty(config.ThumbnailUrl))
       dico.Add("thumbnail_url", config.ThumbnailUrl);
    var postContent = new FormUrlEncodedContent(dico);

    var response = await httpClient.PostAsync("https://api.dailymotion.com/me/videos", postContent);

我无法提供缩略图 URL,但它包含 287 个字符。这是个问题吗?我需要 URL 编码吗?

感谢您的帮助

【问题讨论】:

    标签: dailymotion-api


    【解决方案1】:

    此视频的原始缩略图的网址(全尺寸与比例有关)。 某些用户有权通过提供自定义缩略图的 URL 来更改此值。如果您没有权限,缩略图将不会更新。注意:对于直播,默认每 5 mn 自动生成一次缩略图;无法再手动刷新预览。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-16
      • 1970-01-01
      • 2021-10-07
      • 1970-01-01
      • 2016-03-26
      • 2011-08-11
      • 1970-01-01
      相关资源
      最近更新 更多