Jump to content

I've been trying to learn how to use curl and it works for the most part when I use a command like this (I'm using Windows' cmd)

curl --upload-file Test.txt https://x/

but I want to see the progress it takes to upload, i've tried with bigger files that take ~20 secs to upload and I'd like to see the progress and not just a frozen CMD terminal

curl --progress-bar --upload-file Test.mp4 https://x/

I figured adding --progress-bar would give me a progress bar but it doesn't, it has the same exact result. I found this on the internet, people have to put "| cat" at the end for it to work on linux, I can't find any for windows but Ia ssume "|type" worked the same way, and it shows the progress! But i think it messes with the file, because it would give me an error when it reaches 100% "url: (23) Failed writing body" this is the command i used

curl --progress-bar --upload-file Test.mp4 https://x/ | type

I presume the pre-installed curl on windows is a bit different, but I presume I can still do what I want, could someone help me out? Thanks!

Link to comment
https://linustechtips.com/topic/1530543-help-using-curl/
Share on other sites

Link to post
Share on other sites

Are you using PowerShell? Because "curl" in PowerShell is actually an alias for Microsoft's "Invoke-WebRequest" command. So you'll have to look up which arguments that one takes.

 

If you want actual curl, I'd use WSL instead, then you should be able to use cat etc.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1530543-help-using-curl/#findComment-16130116
Share on other sites

Link to post
Share on other sites

6 minutes ago, Eigenvektor said:

Are you using PowerShell? Because "curl" in PowerShell is actually an alias for Microsoft's "Invoke-WebRequest" command. So you'll have to look up which arguments that one takes.

 

If you want actual curl, I'd use WSL instead, then you should be able to use cat etc.

Oh my bad I don't think i specified what I was using, I'm using "command prompt" i presume the curl using command prompt is the real one?

Link to comment
https://linustechtips.com/topic/1530543-help-using-curl/#findComment-16130121
Share on other sites

Link to post
Share on other sites

9 minutes ago, Flux Azreal said:

Oh my bad I don't think i specified what I was using, I'm using "command prompt" i presume the curl using command prompt is the real one?

It should be. To make sure type "curl.exe" instead. The problem is likely "type", as you said. It probably cuts off the stream before the upload is completely finished.

 

I'd try using something like Cygwin, which also contains cat, or the WSL2 that's built into Windows.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
https://linustechtips.com/topic/1530543-help-using-curl/#findComment-16130129
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×