Project

General

Profile

Actions

Defect #10312

closed

Can not attach empty files.

Added by fangzheng (方正) almost 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

Steps:
  1. Click "New issue" to create an issue.
  2. Attach an empty file(0 bytes) and type some words in the description box.
  3. Click Create Button.

Actual Result:
The issue is created without attachments.

Version:
Redmine demo site, vereion 1.3.1.devel.8860

Well, I'm not sure if this is expected. Just put it here, just in case.


Related issues

Is duplicate of Redmine - Defect #5969: Attachments with size zero are ignoredClosed2010-07-27

Actions
Actions #1

Updated by fangzheng (方正) over 12 years ago

Empty attachment is considered as invalid file in some other bug tracking system.
Maybe redmine has a similar thought?

Actions #2

Updated by Michael Esemplare almost 11 years ago

Affects current versions also (2.4)

While an empty file is not attached, it is still being databased.

Started POST "/uploads.js?attachment_id=1&filename=My_Empty_File.txt" for 192.168.56.101 at Mon Jan 06 14:47:36 +0000 2014
Processing by AttachmentsController#upload as JS
  Parameters: {"attachment_id"=>"1", "filename"=>"My_Empty_File.txt"}
  Current user: michael (id=3)
  Rendered attachments/upload.js.erb (0.4ms)
Completed 200 OK in 62.4ms (Views: 1.2ms | ActiveRecord: 57.4ms)

Started POST "/documents/3/add_attachment" for 192.168.56.101 at Mon Jan 06 14:48:33 +0000 2014
Processing by DocumentsController#add_attachment as HTML
  Parameters: {"id"=>"3", "authenticity_token"=>"aTwertwERTW34tT+trwetW41tqwtWQER23=", "attachments"=>{"1"=>{"filename"=>"My_Empty_File.txt", "description"=>"Describing empty file", "token"=>"64."}}, "utf8"=>"?", "commit"=>"Add"}
  Current user: michael (id=3)
Redirected to http://192.168.56.102/documents/3
Completed 302 Found in 10.0ms (ActiveRecord: 0.7ms)

Started GET "/documents/3" for 192.168.56.101 at Mon Jan 06 14:48:33 +0000 2014
Processing by DocumentsController#show as HTML
  Parameters: {"id"=>"3"}
  Current user: michael (id=3)
  Rendered attachments/_links.html.erb (6.6ms)
  Rendered attachments/_form.html.erb (1.8ms)
  Rendered documents/show.html.erb within layouts/base (14.5ms)
Completed 200 OK in 43.2ms (Views: 32.1ms | ActiveRecord: 1.8ms)

Item in table:
  • id: 61
  • container_id: ""
  • container_type: ""
  • filename: My_Empty_File.txt
  • disk_filename: ""
  • filesize: 0
  • content_type: ""
  • digest: ""
  • downloads: 0
  • author_id: 3
  • created_on: 2014-01-06 13:59:26
  • description: "" (Empty even if added a description)
  • disk_directory: ""
Actions #3

Updated by Go MAEDA over 9 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Closing as duplicate of #5969.
Thank you for reporting this issue.

Actions #4

Updated by Go MAEDA over 9 years ago

  • Is duplicate of Defect #5969: Attachments with size zero are ignored added
Actions

Also available in: Atom PDF