Hi guys,
Yesterday I had this same problem and when looking arooud for some solution I found about .htacess
Well, it was too late and I was almost asleep when I wrote this answer to help it out.
Let me splain in more details now. But, just to remember…
…works for me and not necessary will work for everybody, ok?
JUst give it a try…
In Contact Form 7 Panel (WordPress Admin Panel)
Follow these instructions to get fields in your form:
https://contactform7.com/file-uploading-and-attachment/
FORM
You will end up with one code like this:
[file file-280 filetypes:pdf limit:2mb]
“file-280” was my code by the way ?? If you want all kinks of file and no limits size, let it blank, like this:
[file file-280]
MAIL
After that, don’t forget to put this code inside the
box “file attachments” with the brackets, like this:
[file-280]
after that, make a test and if not work – like in my case – open
your FTP software and go to the folder that was created by CF7
wp-content/uploads/wpcf7_uploads
change the permission – CHMOD – of this folder to 777 and
copy .htacess to your computer and write this inside:
order deny,allow
deny from all
allow from 127.0.0.1
Before upload, rename the .htacess in your host to some like “.htacess.old”
then upload the new one. Refresh the files in your folder and you’ll see
that the file you rename it will be automatically deleted.
After that just check if .htacess remains like you changed.
That’s it. Just test it.
I hope this can help.