Project

General

Profile

Actions

Defect #5969

closed

Attachments with size zero are ignored

Added by Yuriy Vidineev almost 14 years ago. Updated about 7 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

How to reproduce:
- create file with zero size (for example, in Linux: touch redmine_test_file.txt)
- try to add this file to existing issue

Results:Issue has not any uploaded file

I have Redmine 1.0.0 on Debian Lenny with mongrel and MySQL 5.0

Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.4
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /var/www/redmine-1.0.0
Database adapter mysql
Database schema version 20100705164950

About your Redmine plugins
Redmine Graphs plugin 0.1.0
Simple CI 1.0
Redmine Charts 0.1.0
Scrumdashboard plugin 1.2
Mylyn Connector plugin 2.6.4.trunk.423

In production.log i can see this:

Processing IssuesController#update (for X.X.X.X at 2010-07-27 08:05:14) [PUT]
Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Принять", "notes"=>"", "action"=>"update", "_method"=>"put", "authenticity_token"=>"Kieyq
oJZuBzsxZldQfF/7ijY4Dj4U4EWWDss06SHiSo=", "id"=>"10758", "issue"=>{"start_date"=>"2010-07-26", "custom_field_values"=>{"8"=>"2010-07-27"}, "estimated_hours"=>"", "priority_id"=>"6
", "parent_issue_id"=>"", "lock_version"=>"8", "fixed_version_id"=>"", "done_ratio"=>"0", "assigned_to_id"=>"8", "subject"=>"Test Task ", "category_id"=>"126", "tracker_id"=>"14", "due_date"=>"", "status_id"=>"2", "description"=>"Test Test"}, "controller"=>"issues", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100727-28985-l0uv9f-0>, "description"=>"test file"}}}
Redirected to http://prj.slweb.ru/issues/10758
Completed in 340ms (DB: 48) | 302 Found [http://prj.slweb.ru/issues/10758/edit]

If i do:
echo 1 > redmine_test_file.txt
then this file can be added successfully.

P.S. Sorry for my English
Thank you!


Files


Related issues

Related to Redmine - Patch #23718: do not ignore zero byte attachmentsClosed

Actions
Related to Redmine - Patch #25115: Support upload of empty files and fix invalid API responseClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Defect #10312: Can not attach empty files.Closed

Actions
Actions

Also available in: Atom PDF