Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Post History
I upload a 150 MB file via PowerShell to a JFrog Artifactory server as follows: $FilePath = "dataset.tar.gz" $URL = "https://artifactory.somesite.com/artifactory/project1/dataset.tar.gz" $ARTIFA...
Question
powershell
#1: Initial revision
Why does this PowerShell command first request writing all bytes before uploading to JFrog Artifactory and how can I make it stream bytes immediately?
I upload a 150 MB file via PowerShell to a JFrog Artifactory server as follows: ``` $FilePath = "dataset.tar.gz" $URL = "https://artifactory.somesite.com/artifactory/project1/dataset.tar.gz" $ARTIFACTORY_API_TOKEN = "redacted" Invoke-RestMethod -Uri $URL -Method Put -Headers @{ "X-JFrog-Art-Api" = $ARTIFACTORY_API_TOKEN } -InFile $FilePath ``` To my surprise, it first requested writing all the bytes:  which takes a minute or two, before actually sending the bytes that the file contains to the server. Why, and how can I avoid that (I'd prefer if it start upload the bytes that the file contain immediately)?