-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility moduleWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group
Milestone
Description
How to get a file name from the server when downloading a file?
The server has a Content-Disposition property, how to get it, and is used when downloading files
Steps to reproduce
$URL=@'
https://skydrive.live.com/download?resid=A78ACCAEBB24EDD7!37948&authkey=!AKjXpDoxgONjhUw
'@
Iwr $URL -outfile ./
Or
$a=Iwr $URL -outfile ./sssExpected behavior
Autoaddfilename
Or
PS >$a.headers
Key Value
--- -----
x-amz-id-2 {XAI956ZLVN5q12SAfXINuiiU6rUrLD0w88mtCcMt1uLcwwv…
x-amz-request-id {3EE4C53FE4416D0E}
Date {Fri, 24 Jan 2020 08:36:04 GMT}
ETag {"c4ac8566c3831011ab981c9662b33183"}
Accept-Ranges {bytes}
Server {AmazonS3}
Last-Modified {Wed, 18 Dec 2019 08:27:16 GMT}
Content-Disposition {attachment; filename=OpenSSH-Win32.zip}
Content-Type {application/octet-stream}
Content-Length {3018600}
Actual behavior
Error or null
Environment data
mklement0, v-rosa, davetapley, BlackthornYugen, ziesemer and 16 more
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugKeepOpenThe bot will ignore these and not auto-closeThe bot will ignore these and not auto-closeWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility moduleWG-NeedsReviewNeeds a review by the labeled Working GroupNeeds a review by the labeled Working Group