I'm trying to troubleshoot issues with uploading videos through the api using file chunks. I have a sample file that is 4704384 bytes and I'm sending chunks with a maximum size of 1048576 bytes. So there will be 4 chunks of 1048576 and 1 chunk of 510080. The chunks seem to be sent to Vimeo fine, but when I call vimeo.videos.upload.verifyChunks, I get this response:

<?xml version="1.0" encoding="UTF-8"?>
<rsp generated_in="3.8400" stat="ok">
  <ticket id="cf2c9a26eea3aaffb9b4593efc1e0eda">
    <chunks>
      <chunk id="cf2c9a26eea3aaffb9b4593efc1e0eda" size="511436"/>
    </chunks>
  </ticket>
</rsp>

Does the chunk size not match any of my expected chunks because of the other http headers that are sent along with the actual file data? Also, is there an issue here because the format of the response doesn't match up with the example response on Vimeo's upload api page? their example:

<?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
    <ticket id="abcdef124567890">
        <chunk id="0" size="678900" />
        <chunk id="1" size="678900" />
        <chunk id="2" size="4003" />
    </ticket>
</rsp>

Why are all my chunks combined into one entry and the id is the same as the ticket id?

When I call vimeo.videos.upload.complete, I get this:

<?xml version="1.0" encoding="UTF-8"?>
<rsp generated_in="2.3289" stat="fail">
  <err code="708" expl="The file could not be saved. Try again." msg="File error"/>
</rsp>

How can I troubleshoot this to figure out what's going on?

Update: I think my problem is I was trying to send multiple chunks via PUT which is used for streaming the entire file. To upload chunks it needs to be a POST. But when I try to post to Vimeo, I get this error: "An established connection was aborted by the software in your host machine". I have tried disabling anti-virus and windows firewall which was recommended to fix this error but it did not help.

有帮助吗?

解决方案

It turns out I was using the old vimeo.videos.upload.getTicket call I had been using for streaming small videos which used upload_method=streaming which uses PUT. I updated it to upload_method=post and my multi-chunk POST works.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top