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.

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

报告相同问题?