• Hi,

    Good day!

    I have a problem on uploading an excel sheet on the form. There is an error (file not allowed). I also found out that there are Default acceptable file types (extensions) are: jpg, jpeg, png, gif, pdf, doc, docx, ppt, pptx, odt, avi, ogg, m4a, mov, mp3, mp4, mpg, wav, and wmv. Default acceptable file size is 1 MB (1048576 bytes).

    Is there any way that I can upload an excel sheet on the form?

    https://wordpress.org/plugins/contact-form-7/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter Toink22

    (@toink22)

    I just edited file.php to add some file extension to solve the issue. 🙂

    Hopefully others reading this post will NOT follow your approach. Why not just add the Excel file extensions to the CF7 filetypes: attribute as shown in the documentation Takayuki linked to.

    Thread Starter Toink22

    (@toink22)

    I know it is not a good idea to edit core codes of the plugins but that is the only way to solve the issue. If someone will follow this approach they need to update file.php everything they update the plugin. To allow them to upload files that are not in the list of acceptable file -> http://contactform7.com/file-uploading-and-attachment/.

    Thread Starter Toink22

    (@toink22)

    Hi buzztone,

    I think you dont get my problem. I want to upload an excel sheet on the form. So I genereted this code [file attached-file filetypes:pdf|txt|xlsx limit:2mb]

    Having on filetype still doesn’t allow you to upload excel sheet. You will get “file not allowed” error. So meaning, it’s on the core code that you are not allowed to upload excel file.

    So I edited file.php to solve the issue. 🙂

    I wasn’t aware that the xlsx file ending was not allowed. Hopefully Takayuki will clarify this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘File Extension’ is closed to new replies.