XUpload - Specifying file types - where?

Message
Author
Gilesplus
Posts: 3
Joined: Mar 26, 2009 12:51 pm

Specifying file types - where?

#1 Postby Gilesplus » Mar 26, 2009 12:57 pm

Hi,

I am using XUpload free version, and it has been working great and I have been really pleased with it. I am totally new to this type of thing, so I was very happy when it started working.

However recently one user has had trouble uploading a specific type of file (.m4a) I have searched through all the files and configs etc that I can find and added this as an accepted file type, but the error message "Extension not allowed etc." pops up each time, it works fine for other file types.

Could someone tell me all the places where the accepted file types need to be specified, I feel like I have been over every single one, but obviously something is missing.

Thanks in advance,

Giles

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Mar 26, 2009 11:24 pm

ext_allowed and ext_not_allowed in XUploadConfig.pm
Should be empty.

Gilesplus
Posts: 3
Joined: Mar 26, 2009 12:51 pm

re: specifying file types

#3 Postby Gilesplus » Mar 27, 2009 12:52 am

Hi PilgrimX182,

thanks for the reply.

The line you mention in XUploadconfig.pm in my version is:

# Allowed file extensions delimited with '|'
ext_allowed => 'doc|pdf|aiff|mp3|m4a|txt|csv',

which I understood will limit uploads to these types - as you can see I put m4a in there as that is one I want to allow.

From your message it seems like this line should just be entirely blank - but would this allow any file types to be uploaded, something I would like to avoid? If it does just need to be blank (and now you will see my beginner level of understanding!) how does one make it blank?

eg
ext_allowed => '',
or
ext_allowed =>
or
ext_allowed => ,

?


Also I cannot see line that specifies ext_not_allowed - am I missing something?

thanks in advance,

Giles

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » Mar 30, 2009 3:55 am

sorry, haven't noticed it's free version.
To allow all extensions config should be

Code: Select all

 ext_allowed     => '.*',

Gilesplus
Posts: 3
Joined: Mar 26, 2009 12:51 pm

Specifying file types - where? - Solved

#5 Postby Gilesplus » Mar 30, 2009 6:39 am

Hi PilgrimX182,

thank for this explanation - keeping it simple really helps me ;-)

I changed Xuploadconfig.pm as described, but the problem remained - an error message popped up saying:

(website name)
Extension not allowed for file: "xyz.m4a"
Only these extensions are allowed: doc,pdf,aiff,mp3,txt,csv


For the sake of helping others I outline below how I fixed this:

I had a further look around my site to try to find any other files that specified the files types allowed. I found the files types are also specified in Upload.html.

I am using Rapidweaver and I have got XUpload to work by having a Custom Header in Rapidweaver on the page where the upload form resides, this custom header is the content of Upload.html - so there is no separate file called Upload.html.

I had not changed the file types in that header so that is why it was not accepting the file types I had specified in the XUploadconfig.pm

Now that the header is changed the form works fine,

Many thanks for your help,

Giles