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
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

kkaefer - March 17, 2006 - 18:25

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

aaustin - March 17, 2006 - 19:29

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

dopry - March 17, 2006 - 20:33
Assigned to:Anonymous» dopry

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

kahy - March 17, 2006 - 22:13

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

killes@www.drop.org - March 18, 2006 - 13:12
Priority:critical» normal

Can you upload images without JS? Switch off the JS setting in your browser to test.

Downgrading as it is not easily reproducible.

#6

kahy - March 18, 2006 - 13:28

When I switch JS off it works. Actually, the file is uploaded but the message

warning: getimagesize(): Read error! in /var/www/html/drupal/includes/image.inc on line 89.

is thrown

#7

killes@www.drop.org - March 18, 2006 - 13:57

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

kahy - March 19, 2006 - 20:21
Title:uploading files doesn't work properly» uploading files doesn't work properly for files with 0 size
Priority:normal» critical

When I upload a file which has zero size i got following error :

warning: getimagesize(): Read error! in /var/www/html/drupal/includes/image.inc on line 89.

If the file is bigger than 0, it works fine.

#9

webchick - March 20, 2006 - 01:41
Priority:critical» normal

So... don't do that? :)

Not critical, imo.

#10

sime - March 20, 2006 - 14:18
Title:uploading files doesn't work properly for files with 0 size» allow uploading of 0-length files
Version:4.7.0-beta6» x.y.z
Category:bug report» feature request

I'll take it further and suggest this is a feature request rather than a bug.
Removing from beta6 queue.

#11

LAsan - March 26, 2008 - 17:44
Version:x.y.z» 7.x-dev
Status:active» fixed

2 years without feedback.

Moving to fixed

#12

webchick - March 27, 2008 - 16:08
Status:fixed» active

Can you confirm that this problem actually has been fixed in Drupal 7? If you upload a 0-length file, what happens?

 
 

Drupal is a registered trademark of Dries Buytaert.