Tagged: file txt extension
I would like to upload txt files using the File field, but I think the supported extensions are pdf and doc according to the following code:
$extensions = array(
‘file’ => array(
‘doc’,
‘docx’,
‘pdf’,I’ve added a new line with the string ‘txt’ to that array with no luck. I get the same error (“Invalid file”) when I try to upload a txt file.
Any idea?
Hi Tarod,
Thank you for posting.1. Please make sure that the file size is greater than 1 KB(We have a rounding function that rounds to zero and causes the above message if file is less than a KB). In next update, we will remove the rounding from testing file validity.
2 You will still get security error. Please install WP ADD Mime Types plugin and add the following two types(as shown in red)
https://i.imgur.com/UELQYh9.pngAfter that, you will be able to upload text file.
Regards
BrajeshHi Frank,
Thank you.
I am assuming that it works with the above condition for you now?
The topic ‘ [Resolved] Xprofile Field Types – upload txt files’ is closed to new replies.