Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invoke-WebRequest to show expected download size and more human readable format (MB/GB instead of Bytes) #14610

Copy link
Copy link
@bergmeister

Description

@bergmeister
Issue body actions

Summary of the new feature/enhancement

Currently, users of Invoke-WebRequest do not know how much they have downloaded because a big Byte number gets displayed and due to the digits not being mono-spaced, I cannot even attempt to count digits whilst the number changes every second. Also, I have no progress bar to tell me how much it needs to download.

Proposed technical implementation details (optional)

ByteSize is a small (14KB) library to better display human readable file sizes but as the problem is quite simple, it was decided to not introduce a dependency but rather just hand-code it instead. Because PowerShell treats 1 KB as 1024, it should probably use 1024 as the base for KB, MB, etc.

I suggest to have one significant digit after after the comma starting with KB and increase the number of significant digits by 1 for MB, GB, etc.

PR here: #14611

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.