Summary of the new feature/enhancement
As a user downloading from an aka.ms URL, I want the filename of my downloaded file to automatically match that of the source file.
E.g. on Linux, if I do
wget https://aka.ms/downloadazcopy-v10-linux
It just works. The output file is created, and it has the right name. E.g. when the aka.ms link points to a file name AzCopy_linux-amd64-10.0.9.tar.gz, that's the name I end up with on disk. When someone updates the aka ms link to point to, say AzCopy_linux-amd64-10.2.0.tar.gz, then I can run the same command as before, and this time I automatically get the updated name.
This is useful for cases where the filename conveys useful information (such as the version).
But in PowerShell, I can't automatically use the file's existing name. I have to specify a name. But because the URL is a redirect, via aka.ms, I don't actually know the name of the download file in advance. So I can't specify a meaningful name (e.g. I can't include the version number). I still get the file, but I lose any information that was in its original name
Proposed technical implementation details (optional)
Add a new command line parameter, called something like `PreserveFilename'. So the PowerShell equivalent of the Linux command above would be
Invoke-WebRequest https://aka.ms/downloadazcopy-v10-linux --PreserveFilename
Summary of the new feature/enhancement
As a user downloading from an aka.ms URL, I want the filename of my downloaded file to automatically match that of the source file.
E.g. on Linux, if I do
It just works. The output file is created, and it has the right name. E.g. when the aka.ms link points to a file name AzCopy_linux-amd64-10.0.9.tar.gz, that's the name I end up with on disk. When someone updates the aka ms link to point to, say AzCopy_linux-amd64-10.2.0.tar.gz, then I can run the same command as before, and this time I automatically get the updated name.
This is useful for cases where the filename conveys useful information (such as the version).
But in PowerShell, I can't automatically use the file's existing name. I have to specify a name. But because the URL is a redirect, via aka.ms, I don't actually know the name of the download file in advance. So I can't specify a meaningful name (e.g. I can't include the version number). I still get the file, but I lose any information that was in its original name
Proposed technical implementation details (optional)
Add a new command line parameter, called something like `PreserveFilename'. So the PowerShell equivalent of the Linux command above would be