https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-07-27T07:46:51ZRedmineRedmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=187332010-07-27T07:46:51ZFelix Schäfer
<ul></ul><p>If this updates adds an empty file, I can't reproduce the issue.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=187342010-07-27T07:48:58ZFelix Schäfer
<ul><li><strong>Subject</strong> changed from <i>Could not upload file with zero size into existing issue</i> to <i>Attachments with size zero are ignored</i></li><li><strong>Category</strong> set to <i>Attachments</i></li><li><strong>Affected version (unused)</strong> set to <i>devel</i></li></ul><p>Ok, my precedent note should have included an empty attachment, so I can reproduce this issue.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=187462010-07-27T11:26:47ZHolger Just
<ul></ul><p>This is because of <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/attachment.rb#L147">source:trunk/app/models/attachment.rb#L147</a></p>
<p>Attachments with size zero are explicitly ignored.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=187482010-07-27T11:44:29ZFelix Schäfer
<ul></ul><p>Any reason for not uploading null-sized attachments, or on the other hand any reason for wanting to upload null-sized files?</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=190402010-08-06T06:03:06ZYuriy Vidineev
<ul></ul><p>We want to upload google verification files - files with special name and zero size</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=190422010-08-06T06:39:02ZFelix Schäfer
<ul></ul><p>IIRC google verification files have to live in the root of the URI you want to verify, for that you'd need to put the file in <code>redmine_dir/public/</code>.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=190442010-08-06T06:47:14ZYuriy Vidineev
<ul></ul><p>I may not correctly put. I don't wont to verify my Redmine. I want to verify my another website and add google verification file to task in Redmine. But i can't add this file to task because it has zero size.<br />P.S. Sorry for my English</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=190452010-08-06T07:14:26ZFelix Schäfer
<ul></ul><p>Well, you could just save the filename in a wiki or wherever, and I think google retains means to download the files even long after they have been activated ;-)</p>
<p>Anyway, Holger, do you see any reason to not allow zero-sized files?</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=190472010-08-06T08:28:43ZHolger Just
<ul></ul><p>I still do not see the point why you would want that. Also, the file you downloaded from google is not a zero byte file. It at least contains the code that is also present in the filename.</p>
<p>But I see no technical reasons why a zero byte file would not be possible, apart from possibly obscure browser bugs of course. Also, I just traced the code back to the initial revision, so we can also safely fall back to "we always did it that way" :) See <a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4/entry/trunk/redmine/app/controllers/documents_controller.rb#L46">source:trunk/redmine/app/controllers/documents_controller.rb@4#L46</a></p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=443442013-01-15T09:30:59ZDaniel Felix
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li></ul><p>Any news on this? Should this be corrected or is this excluded by design?</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=444362013-01-15T21:17:52ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>Confirmed</i></li></ul><p>I mark this as confirmed as there's no good reason to ignore empty files.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=628572015-04-06T14:12:30ZGo MAEDA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/10312">Defect #10312</a>: Can not attach empty files.</i> added</li></ul> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=631472015-04-15T15:46:24ZStephen Ostrow
<ul></ul><p>Felix Schäfer wrote:</p>
<blockquote>
<p>Any reason for not uploading null-sized attachments, or on the other hand any reason for wanting to upload null-sized files?</p>
</blockquote>
<p>Figured I would add another use-case as an example and why I went looking to see if this bug was already filed. Over the past month or so I've been uploading 4 files when running an operation.</p>
<ol>
<li>before.txt</li>
<li>operation.log</li>
<li>after.txt</li>
<li>result.diff</li>
</ol>
<p>Where result.diff is a diff of the before.txt and the after.txt files. When there is no difference then the .diff file is empty (0b) and although I still want it uploaded to show that fact, redmine is silently ignoring the upload.</p>
<p>I personally would like for redmine to upload 0b files since I can't think of a good reason for it not to. But more so I would say it is a bug that it silently ignores the 0b file after showing you that it has been added to the issue.</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=730912016-08-30T12:24:07ZJens Krämerjk@jkraemer.net
<ul></ul><p>Submitted a patch that fixes this in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: do not ignore zero byte attachments (Closed)" href="https://www.redmine.org/issues/23718">#23718</a></p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=731112016-08-31T01:23:54ZJens Krämerjk@jkraemer.net
<ul><li><strong>File</strong> <a href="/attachments/16626">0001-allow-upload-of-zero-byte-files-as-attachments.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/16626/0001-allow-upload-of-zero-byte-files-as-attachments.patch">0001-allow-upload-of-zero-byte-files-as-attachments.patch</a> added</li></ul><p>attaching the patch here as requested :)</p> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=731172016-08-31T07:26:11ZJan from Planio www.plan.io
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/23718">Patch #23718</a>: do not ignore zero byte attachments</i> added</li></ul> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=731192016-08-31T07:28:26ZJan from Planio www.plan.io
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=767532017-02-18T02:15:35ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-3 status-5 priority-4 priority-default closed" href="/issues/25115">Patch #25115</a>: Support upload of empty files and fix invalid API response</i> added</li></ul> Redmine - Defect #5969: Attachments with size zero are ignoredhttps://www.redmine.org/issues/5969?journal_id=769982017-03-01T00:15:54ZGo MAEDA
<ul><li><strong>Status</strong> changed from <i>Confirmed</i> to <i>Closed</i></li><li><strong>Target version</strong> deleted (<del><i>Candidate for next minor release</i></del>)</li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed by <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Support upload of empty files and fix invalid API response (Closed)" href="https://www.redmine.org/issues/25115">#25115</a> for 3.3.3 and 3.4.0.</p>