feat(landerctl): show progress bar for file uploads
ci/woodpecker/push/docker Pipeline was successful Details

release/0.2.0
Jef Roosens 2023-11-16 12:46:52 +01:00
parent e42004de94
commit e3aad2b5e4
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ landerctl_err landerctl_post_file(landerctl_ctx *ctx) {
curl_easy_setopt(ctx->curl, CURLOPT_POST, 1L);
curl_easy_setopt(ctx->curl, CURLOPT_READDATA, ctx->data_file);
curl_easy_setopt(ctx->curl, CURLOPT_POSTFIELDSIZE_LARGE, sb.st_size);
curl_easy_setopt(ctx->curl, CURLOPT_NOPROGRESS, 0L);
magic_t cookie = magic_open(MAGIC_MIME_TYPE);
magic_load(cookie, NULL);