Problems uploading certain types of files with upload module...

mediumgrade - February 18, 2008 - 00:52

I am having an interesting problem with my upload module:

I am having trouble attaching various files via the upload module. It seems that I can attach txt, html and php files (perhaps all ascii files) but nothing else. I have tried adding png, jpg, doc, xls, and pdf files but with no results. The form simple returns with nothing having been attached. The file upload permissions are set to their defaults (which should allow all the file types I have just listed) and I even set the permissions on the files and tmp directories to 777 just to be sure. I do not see any error messages in php (other than trying to serve the http://www.mysite.com/files) and I don't see any errors in Drupal (other than the foreach call trying to reference an invalid argument. This seems to be due to the fact that the file is non-existent, but it's still trying to parse the argument as if it expects one).

I would use the image_upload module, but the ad module uses regular upload for uploading images. Can someone please help!

I would suggest that you

lhtown - February 18, 2008 - 01:40

I would suggest that you make sure there isn't a syntax error on your file uploads configuration page where you can tell it what file types to allow. I have one that read as follows:
jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp

Make sure there are no strange characters and that there are spaces between all of the file types. Obviously, the file types you want to display should be listed.

If that doesn't work, you need to make sure that the file you are trying to upload isn't too large.

I am not sure how, but I would imagine that your webserver could also be configured to refuse certain file types, although that would seem unusual.

No luck. I replaced my

mediumgrade - February 18, 2008 - 01:54

No luck. I replaced my allowed files string with yours and still the same (yours looks like the default as well).

The web server is our own and I don't believe we've made any special changes to it. I will look into this further, though.

Any more ideas?

Maybe you edited your

lhtown - February 18, 2008 - 02:17

Maybe you edited your .htaccess file and did something goofy?

No. I had uncommented the

mediumgrade - February 18, 2008 - 02:37

No. I had uncommented the RewriteBase line, but that's all. I even overwrote that file with a fresh copy and still no luck. I even tried disabling clean urls and still nothing.

I would head on over to the

lhtown - February 18, 2008 - 02:38

I would head on over to the issue queue and post a bug report if you can't find a similar outstanding bug. I can't think of anything else but a bug. If you have done a lot of playing on your site, a reinstall might be in order just to make sure things are clean.

 
 

Drupal is a registered trademark of Dries Buytaert.