我正在使用我的应用程序在Vimeo上传视频,但我的一些视频状态没有得到更新 
我已经关注了此链接中提供的api文档:https://developer.vimeo.com/api/upload/videos:
我使用下面的代码:
public boolean sendVideo(String file1, String completeURi, String endpoint, String id) throws FileNotFoundException, IOException {
File file = new File(file1);
long contentLength = file.length();
String contentLengthString = Long.toString(contentLength);
FileInputStream is = new FileInputStream(file);
int bufferSize = 20485760;
byte[] bytesPortion = new byte[bufferSize];
int byteNumber = 0;
while (is.read(bytesPortion, 0, bufferSize) != -1) {
String contentRange = Integer.toString(byteNumber);
boolean success = false;
int bytesOnServer = 0;
while (!success) {
long bytesLeft = contentLength - (bytesOnServer); …Run Code Online (Sandbox Code Playgroud)