Closed petarljubic closed 4 years ago
You must use the beginOrResumeUploadFromURL
method when uploading to Vimeo. See the example at https://github.com/tus/tus-java-client#usage.
Hello again,
I changed my code and used beginOrResumeUploadFromURL
, but I have same error. I noticed that createUpload
has POST method, but beginOrResumeUploadFromURL
has GET method, and that's because why I try with createUpload
first.
If you need more information, here is an example of complete request:
URL: https://1512435597.cloud.vimeo.com/upload?ticket_id=323388629&video_file_id=1805038089&signature=90f804eabe27730f51e8e9d0ca8ed3d8&v6=1&redirect_url=http%3A%2F%2Fvimeo.com%2Fupload%2Fapi%3Fvideo_file_id%3D1805038089%26app_id%3D174685%26ticket_id%...{etc}
Headers:
Upload-Length: 13673202
Upload-Offset: 0
Content-Length: 13673202
Content-Type: application/offset+octet-stream
Accept: application/vnd.vimeo.*+json; version=3.2
Tus-Resumable: 1.0.0
X-HTTP-Method-Override: PATCH
Authorization: Basic {some string}
Frankly, I don't know what is causing this. Please contact Vimeo's support for their API. I have never used their API, so I cannot really provide good help.
Thank you anyway, I will post the solution when Vimeo's support respond on my question...
After I post this question to https://stackoverflow.com/questions/61818110/vimeo-upload-unexpected-status-code-404-while-resuming-upload, I found a problem and a solution. The latest Vimeo Android lib use version 3.2
instead of 3.4
, so it put application/vnd.vimeo.*+json;version=3.2
instead of application/vnd.vimeo.*+json;version=3.4
as the Accept
header value. Now I have encountered a new problem. Each upload attempt stucks after a few seconds without giving me any error, but I will try to fix it by my own.
Thanks for reporting back how you fixed it!
Question Hello, I am trying to upload video on Vimeo with your library. I have upload access, I have PRO account, and I follow this tutorial (https://developer.vimeo.com/api/upload/videos). After I get {upload_link} from vimeo, I try to start video upload, so I select .mp4 file from storage via your example code, pass upload_link as link of UploadCreationURL in TusClient, and get error: io.tus.java.client.ProtocolException: unexpected status code (404) while resuming upload. Best regards.
Setup details