Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6580

org.apache.wicket.util.lang.Bytes - toString()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.9.0
    • Fix Version/s: 8.1.0, 9.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      It is not possible to override how the Bytes class is translated to String.

      we would like to override wicket message uploadSingleFileTooLarge about big file and we would like to use form field ${fileMaxSize}. Our max limit is specified in megabytes and as it is specified in wiki (https://en.wikipedia.org/wiki/Megabyte) - the recommended unit symbol is MB, not M

      we know, we can change our message to ...${fileMaxSize}B ... but then in case of value in bytes we would get ... 10 bytesB ...

       

      also there is no space between value and units except bytes so we would like to add it there so we would get e.g. (10 MB, 10 KB, 10 bytes). Current state is (10M, 10K, 10 bytes)

       

      thank you for consideration of this kind of improvement

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              bozikp Peter Bozik
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: