public CompletableFuture<MediaConfigureTimelineResponse> uploadVideoWithTimeout(byte[] videoData,
                                                                                    byte[] coverData,
                                                                                    MediaConfigurePayload payload,
                                                                                    long uploadFinishTimeoutSeconds) {
        String upload_id = String.valueOf(System.currentTimeMillis());
        return client.actions().upload()
                .videoWithCover(videoData, coverData,
                        UploadParameters.forTimelineVideo(upload_id, false))
                .thenCompose(response -> {
                    IGUtils.sleepSeconds(uploadFinishTimeoutSeconds);

                    return client.actions().upload().finish(upload_id);
                })
                .thenCompose(response -> MediaAction.configureMediaToTimeline(client, upload_id, payload));
    }
Upload video with timeout before upload finish request

@param videoData video file bytes
@param coverData cover file bytes
@param payload media payload
@param uploadFinishTimeoutSeconds timeout before upload finish in seconds
@return completable future of MediaConfigureTimelineResponse
src/main/java/com/github/instagram4j/instagram4j/actions/timeline/TimelineAction.java