Hi,
I'm really keen to get this module working since it seems like such a useful feature. Every thing works fine until I actually try to upload a file which results in "The file x could not be uploaded, only files with the following extensions are allowed...". I will try to describe the situation in as much detail as I can:
I'm using the WYSIWYG module with the TinyMCE editor enabled. I have the IMCE plugin and this is all working fine, ie I can upload files without a problem. I also have the imce_mkdir and imce_crop modules with both work fine.
I'm using a 6.x-1.x-dev version of the swfupload module. Unfortunately, I'm not entirely sure where I downloaded this from since the current drupal 6 version on the module page is 6.x-2.0-beta2. I did try with 6.x-2.0-beta2 but I couldn't even get the "upload multiple files" button to appear in imce so I'm now concentrating on 6.x-1.x-dev. I set it up as per the instructions in the ReadMe - putting the 'swfupload.swf' and 'swfupload.js' from SWFUpload v2.2.0.1 Core into modules/swfupload/swfupload/ and using the jquery_plugin module with the two plugins mentioned.
After setting this up and installing the imce swfupload module the swfupload interface appears to be correctly integrated with imce. I get the "upload multiple files" button, i can indeed choose multiple files and send all their details back to imce. At which point I get the error.
The problem seems to occur with any file type, but I have been testing by trying to upload a png file from my desktop. I have allowed the png file extension in many places: The IMCE settings page; The SWFUpload settings page; Hard coded in SWFUpload's settings.inc (modules/swfupload/settings/settings.inc); I also found a post where mcrittenden suggested hard coding it into imce_swfupload.module, which I did by copying his posted code " '#file_extensions' => 'jpg jpeg gif png txt', ".
The strange thing is is that on the same node as I attempt to upload via TinyMCE and IMCE I can upload the same file via the regular SWFUpload file attachment field without a problem. I can also batch upload.
I believe the error message in full is "The file x could not be uploaded, only files with the following extensions are allowed: ." . Its quite hard to tell since it runs out of the edge of the dialogue box and it only appears for a few seconds before the file is removed from the upload section. The "." file type seems strange.
I've tried this in Safari and Firefox and the problem exists identically in both.
Sorry for the long post but I hope i've provided enough information to track down the source of this problem. As I said, I would be very happy to have this module working and I'm so close!
Comments
Comment #1
anasynth commentedChanging the Component and Category fields to possibly more appropriate settings in the hope that it will encourage a response
Comment #2
anasynth commentedComment #3
laurenceg commentedI am getting exactly the same thing but am only using basic drupal plus the bits I need to make an image gallery.
I have done everything I can with the file uploads setting. As the package comes there are quite a few extensions but only text is allowable in create content/image.
System:
New build Ubuntu 10.4 Lucid so all latest everything
ditto: Drupal, Mysql, Apache, PHP, Pear, PECL.
Upload 6.16
I am very new to drupal so if I am missing the blindingly obvious I would appreciate being told about it. (I have been using zencart for some years)
Laurence
Comment #4
anasynth commentedIts encouraging to see I'm not the only one encountering this problem. A similar issue can be found here. In this post dugh actually reproduces the exact error message I'm getting (besides the file name). A solution is suggested involving .HTACCESS if you have access to it but I can't confirm that it works. Unfortunately despite trying I'm still no further with finding a solution to this problem since I made this issue...
Comment #5
xgmorkx commentedSame error here on a client's site after doing an upgrade to 6.16, FileField 6.x-3.3 and I think also an upgrade of the IMCE Wysiwyg API bridge, if I'm not mistaken.
Comment #6
xgmorkx commentedFound the problem here: in my IMCE profile I used "*.jpg" (or did it get converted to this while upgrading the site?) as allowed extension while it had to be just "jpg"!
Let's call it a backward compatibility issue since it worked before upgrading...
Also, it seems multiple extensions have to be seperated by a white space and not a comma like suggested in the help text below the field.
Comment #7
anasynth commentedhi xgmorkx, thanks for your replies,
Could you share the details of the modules and module versions you're using here? Can you confirm that with your set up you are able to use the IMCE file browser and SWFUpload with WYSIWYG running TinyMCE to browse your computer and upload multiple files into a text area (not just onto the node using swfupload).
If this is the case I think I'll just give up on my set up and try to reproduce yours. I may be back here for some help along the way but if it works I will be ecstatic.
Thanks again.
Comment #8
xgmorkx commentedHi anasynth,
Seems that I was slightly off-topic here, I'm not using SWFUpload (got here through a search), though I had the same error message. I'm just using the regular IMCE browser (with wysiwyg and tinymce) and was trying to upload just 1 file. Although, it might be related?
Comment #9
anybodySame problem here using SWFUpload. The file type check seems to be wrong if no file type filters given.
Important notice: The error only happens for NON-Admin users! Even if they have the related permissions etc.
Comment #10
zuffap commentedSuggested fix: DO NOT call file extension validation if the allowed extensions field is empty.
Update swfupolad.admin.inc module, add after $file->validators = array(...); on line 68 the following:
if (empty($widget->extensions)) unset($file->validators['file_validate_extensions']);