Skip to content

Instantly share code, notes, and snippets.

@kjartanvest
Created March 10, 2017 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjartanvest/2d83ca1b5055fd296372358fdc3170b3 to your computer and use it in GitHub Desktop.
Save kjartanvest/2d83ca1b5055fd296372358fdc3170b3 to your computer and use it in GitHub Desktop.
Upload video
File videoFile = new File(<path to video file>);
Context context;
uploader.uploadFile(videoFile, uploadParams, context, new SynqUploadHandler() {
@Override
public void onCompleted() {
// Upload success
}
@Override
public void onFailure(String error) {
// Upload error
}
@Override
public void onProgress(long bytesTransferred, long totalSize) {
double percent = (double)bytesTransferred / (double)totalSize * 100.0;
// Report upload progress to UI
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment