プロジェクト

全般

プロフィール

Vote #63077

完了

attachement's name maybe invalid.

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

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

0%

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

説明

OS: windows
Lang: Chinese
When I uploaded a file with Chinese name, the file saved in Redmine/files directory has a unreadable name, and with some special word, it will failed.
I have a patch to avoid the failing,but the file name in Redmine/files will unreadable.

Index: D:/RedMine/app/models/attachment.rb
===================================================================
--- D:/RedMine/app/models/attachment.rb    (revision 1339)
+++ D:/RedMine/app/models/attachment.rb    (working copy)
@@ -40,7 +40,7 @@
       @temp_file = incoming_file
       if @temp_file.size > 0
         self.filename = sanitize_filename(@temp_file.original_filename)
-        self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + self.filename
+        self.disk_filename = DateTime.now.strftime("%y%m%d%H%M%S") + "_" + Digest::MD5.hexdigest(self.filename)
         self.content_type = @temp_file.content_type.to_s.chomp
         self.filesize = @temp_file.size
       end

journals

And thanks for your great software, sorry for my poor english.
--------------------------------------------------------------------------------
Fixed in r1433. Filename will be hashed if needed.
--------------------------------------------------------------------------------


related_issues

duplicates,Closed,1243,Uploading of attachment with Non-ascii filename fails when host on windows
duplicates,Closed,747,Uploadfile error ?!

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

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

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

いいね!0
いいね!0