プロジェクト

全般

プロフィール

Vote #71999

完了

"Maximum file size" displayed on upload forms is incorrect

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Attachments_19
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
19
version_id:
52
issue_org_id:
11118
author_id:
56930
assigned_to_id:
0
comments:
7
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
49
ステータス-->[Closed]

説明

Hi there!

I just discovered a small issue: Setting "Maximum attachment size" in the Administrator's panel to 25600 kB causes a "Maximum file size" to be shown as 30 MB.

Steps to reproduce:

Log in as administrator and set "Maximum attachment size" to 25600 kB

Change to a project

Go to the file tab

Select "New file"

Observe "Maximum file size" being displayed as 30 MB

Go back to a project

Select "New issue"

Observe "Maximum size" being displayed as 30 MB

My system:

  • Debian Squeeze
  • PostgreSQL 8.4.11-0squeeze1
  • Ruby 1.8.7.302-2squeeze1
  • Rails 3.2.3
  • Redmine 2.0.1

journals

Reproduced with language set to English. Works fine with language set to French.
--------------------------------------------------------------------------------
Please also have a look at message#31218.
--------------------------------------------------------------------------------
Fixed in r9782. It seems that Rails now uses the precision as the number precision instead of the decimal precision in 2.x.
--------------------------------------------------------------------------------
Etienne Massip wrote:
> Please also have a look at message#31218.

You're right, reverted to KB in r9784. I personally dislike IEC prefixes.
--------------------------------------------------------------------------------
Merged in 2.0-stable.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Etienne Massip wrote:
> > Please also have a look at message#31218.
>
> You're right, reverted to KB in r9784. I personally dislike IEC prefixes.

Acttually I'm right about the inconsistency betweenthe prefix used in settings tkB for 1000 bytes) and the actual chech based on a @Numeric#kilobytes@ of 1024 bytes, but was wrong about the revert: KB is indeed not a legal prefix. So, maybe we should either set kB back again and change the check to use @number_human_format_size :prefix => :si@ or set the prefix in settings to 'KiB' which is arguabilly not very understandable yet?
--------------------------------------------------------------------------------
Rails' default is KB and I'm fine with it. According to Wikipedia the symbol for "Kilobyte":http://en.wikipedia.org/wiki/Kilobyte is kB or KB.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリAttachments_19 にセット
  • 対象バージョン2.0.3_52 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0