kurento-repository 上传下载测试

  1. 下载测试

根据id获取url
curl http://127.0.0.1:7676/repo/item/5e72eb8fb95b7f6d4cac917c
{“id”:“5e707642272eab1d44a7c238”,“url”:“http://127.0.0.1:7676/repository_servlet/1sbarrascga47j3mmjkijjm5dc”}

拿到返回结果的url,就可以访问到repository文件

  1. 上传测试
    curl -i -F filedata=@/etc/hosts http://172.19.183.131:7676/repository_servlet/ r e p o I t e m 参 数 f i l e d a t a , 为 上 传 文 件 绝 对 路 径 上 传 地 址 获 取 , 即 h t t p : / / 172.19.183.131 : 7676 / r e p o s i t o r y s e r v l e t / {repoItem} 参数 filedata,为上传文件绝对路径 上传地址获取,即http://172.19.183.131:7676/repository_servlet/ repoItemfiledatahttp://172.19.183.131:7676/repositoryservlet/{repoItem}
    ${itemId},为会话id,获取方法如下。RepositoryItemRecorder.getUrl()即上传地址
RepositoryItemRecorder repoItem = null;
      if (getRepositoryClient() != null) {
        try {
          Map<String, String> metadata = Collections.emptyMap();
          repoItem = getRepositoryClient().createRepositoryItem(metadata);
        } catch (Exception e) {
          log.warn("Unable to create kurento repository items", e);
          e.printStackTrace();
        }
      } 
RecorderEndpoint recorder = new RecorderEndpoint.Builder(pipeline, repoItem.getUrl())
              .withMediaProfile(MediaProfileSpecType.WEBM)
              .build();
  1. 查询上传测试结果
    ./mongofiles -d kurento list

./mongofiles list
./mongofiles -d kurento list

./mongofiles -d kurento -l z1.txt get “sample.txt”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值