allow uploading of 0-length files
kahy - March 17, 2006 - 16:03
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | upload.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | dopry |
| Status: | active |
Jump to:
Description
When upload a file during adding/editing a node in the File attachment section, choose a file and click on the Atach button, the label Uploading file (and rotating picture) appears, but never stops. And if I refresh it, the file is listed there twice (and its physically uploaded as well).

#1
Could you explain the circumstances a bit more detailed? We need to know when this happens. For example, I could not reproduce the bug yet.
#2
I think I saw this same thing a while ago.
I thought it had something to do with Internet Explorer versus Firefox.
http://drupal.org/node/41977
#3
It sounds like a php error occured in back ground, and the javascript didn't catch the error. You are probably experiencing the foreach bug. What happens when you use preview or submit w/o the javascript.
#4
in IE it throws a javascript errors :
firstly:
Line : 320
Char : 3
Error: Unterminated string constant
Code:0
and then:
Line : 1
Char : 1
Error: Object doesn't support this property or method
Code :0
and there is a following error in FF 1.5 in JS console
Error: illegal character
Source File: http://www.londongt.org/drupal/misc/drupal.js
Line: 319, Column: 33
Source Code:
({ status: 1, data: "\nwarning: getimagesize(): Read error! in /var/www/html/drupal/includes/image.inc on line 89.\n\n\n\n \n\n \n
#5
Can you upload images without JS? Switch off the JS setting in your browser to test.
Downgrading as it is not easily reproducible.
#6
When I switch JS off it works. Actually, the file is uploaded but the message
is thrown
#7
That's what I thought. I bet it is someho related to a certain upload related function being called wrongly. file_check_upload is the function, I think.
Some more discussion can be found here: http://drupal.org/node/43220
#8
When I upload a file which has zero size i got following error :
If the file is bigger than 0, it works fine.
#9
So... don't do that? :)
Not critical, imo.
#10
I'll take it further and suggest this is a feature request rather than a bug.
Removing from beta6 queue.
#11
2 years without feedback.
Moving to fixed
#12
Can you confirm that this problem actually has been fixed in Drupal 7? If you upload a 0-length file, what happens?