プロジェクト

全般

プロフィール

Vote #71650

完了

Extend Filesize in the attachments table for files with size > 2147483647 bytes

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
19
version_id:
102
issue_org_id:
10672
author_id:
14749
assigned_to_id:
1
comments:
8
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

We use Redmine for our Projects. On the "Files" Tab we also offer complete VirtualBox images containing trial versions for our software. Naturally these files exceed 2.1 GB in size.

It was a bit tricky to get these files into Redmine but I managed it. (No, I did not upload them via web browser). Now all is perfect. I can download the images and play around with them.

Sadly, due to the "attachment" table definition in the Redmine Database been filesize of INT(11) - which is basically a signed 32 bit integer - the displayed filesize is wrong. So the "Files" Tab always shows the wrong size.

It's not a big deal anyway, since download works. It's just a minor quirk. Maybe a BIGINT in the SQL database definition would help ...


journals

We had a similar problem with bigger downloads. In our case, we manually wrote "-1" to the filesize field and added the real filesize manually in the description, however, it would be very nice to be able to store bigger filesizes directly in the redmine database.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I have created a patch to change type of filesize column to bigint.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I believe that you can use _bigint_ instead of _:limit => 8_

<pre>
def up
change_column :attachments, :filesize, :bigint, :default => 0, :null => false
end
</pre>
--------------------------------------------------------------------------------
bigint is not mentionned in the Rails doc:
http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html#method-i-column
--------------------------------------------------------------------------------
Change committed in r14709.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

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

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

いいね!0
いいね!0