tags:

views:

24

answers:

1

Hi :

I am developing custom upload module. I want to allow users to upload xls and xslx files only. How can I restrict this using file_save_upload function. Thank you

+1  A: 

You should probably use the validate function for the form that has the file upload element on it instead. Or perhaps consider just using the File CCK element and using its settings to only allow files with xls and xlsx extensions to be uploaded - that would probably save you a whole lot of time.

Garrett Albright

related questions