dongying2112 2017-05-03 11:41
浏览 48
已采纳

Vimeo视频上传不返回给定参数(POST上传)

Following the build and HTML form from the Vimeo docs I managed to properly upload a video, but, as setting the video properties/metadata is not allowed before the upload is completed I require that some parameters are returned to me.

The docs state:

We will retain any parameters you have provided, and add one new parameter video_uri.

But they fail to return anything other than the video_uri.


My form is composed of this name, privacy.view and the file:

(Prestashop-smarty tpl)

    <input type="hidden" name="privacy.view" value="nobody">


    <input maxlength="20" class="is_required validate form-control" type="text" id="contentName"
           name="contentName" value="" required/>

    <input type="file" name="file_data" id="exampleInputFile">

    <a href="{$smarty.server.HTTP_REFERER}" class="btn btn-default volver">CANCELAR</a>
    <button type="submit" name="submitFileContent" class="btn btn-default save-profile">
    GUARDAR
    </button>

</form>

I expected Vimeo to return video_uri, name and privacy.view but it's only returning the last one.

I really appreciate any help you can provide.

Edit: I'm passing my own url as the "redirect_url" so no further redirects are being done after vimeo sends the user back to me.

Just in case it can provide anything to the troubleshooting here is the request:

$response = $lib->request('/me/videos', array('redirect_url' => Tools::getHttpHost(true).__PS_BASE_URI__."filecontent"), 'POST');
  • 写回答

1条回答 默认 最新

  • doulangbizhan5160 2017-05-03 14:17
    关注

    I see how this is confusing in the docs, and will make a note to clear it up.

    The parameters we include in the redirect are not user input fields that you request in the form. The parameters we retain in the redirect are any manual querystring parameters you included in the redirect url.

    E.g. if you set your redirect_url to be http://dashron.com?secret_key=abc123, we will retain the secret_key parameter when we redirect the user once the upload is complete.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥15 树莓派5怎么用camera module 3啊
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥15 Attention is all you need 的代码运行