FLV upload not working

divillysausages - August 13, 2009 - 09:23
Project:FCKeditor - WYSIWYG HTML editor
Version:6.x-1.4-rc1
Component:File browser support
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

At the minute I'm working locally. Just installed FCKEditor on a new drupal installation. I'm using the build in file editor. I tried to upload a .flv file, but i got an error from the filemanager saying "Invalid file type". I've checked in sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php and the array for allowed extensions for the flash type is ('swf', 'flv'). For info, swf works fine (as does images etc).

where in the code is it looking at for the file type so i can maybe step through it?

thanks

#1

divillysausages - August 13, 2009 - 13:36

Ok, after some digging into it, this is where I get:
In the function FileUpload in sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/commands.php (around line 175), there's a check for
if ( isset( $_FILES['NewFile'] ) && !is_null( $_FILES['NewFile']['tmp_name'] ) )
before it gets down to the call to see if the extension is valid

If i upload a flv, both of these if checks (isset, is_null) return false, which seems a bit strange, as if i upload a swf, they both come back as true.

sigh, i look further, but if you know where to look at, i'd appreciate the heads up
thanks

#2

Jorrit - August 13, 2009 - 14:21

what web server software are you running?

#3

divillysausages - August 13, 2009 - 14:34

At the minute I'm running it on localhost, using EasyPHP to set up everything (apache, mysql etc.)
As far as i can tell, it's only the flv that fails (though i haven't tried with a lot of file types).

Where it's failing is in the if check above - both return false for .flv, but true for .swf, even if i do one straight after the other

I traced it further back to upload.php, and everything checks out fine there, until the call to FileUpload(). I'm not sure what's calling upload.php (unless it's just the button press, so I can't go back further)

#4

Jorrit - August 13, 2009 - 15:17

does the size of the flv file exceed the maximum upload size of php?

#5

divillysausages - August 13, 2009 - 16:05
Status:active» fixed

Ah! that works now, thanks Jorrit, that's saved me from taking a faceplant out the nearest window :)
Is there any chance of putting that in as an error message, so you get "file size too big" rather than "invalid file type"?

thanks again

#6

Jorrit - August 13, 2009 - 16:48

that would be a good enhancement, but that's something for the fckeditor authors to fix.

#7

System Message - August 27, 2009 - 16:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.