Files uploaded with a form
When a Contact Form 7 form has a file field, the uploaded file is copied to a private folder so it stays available after Contact Form 7 deletes its temporary copy. The file appears in its own column in the entries table (named after the field), separate from the visitor's name, and again in the entry's Attachments box.
Opening a file
Click the file name: it opens in a new tab. Images, PDFs and plain-text files are shown in the browser; every other type is downloaded. In the entry's Attachments box there is also a Download link, and you can delete the file.
How files are protected
- They are stored in a randomly named folder under
wp-content/uploads, under random file names, with no public address. - Every link is signed and checks your login and permission each time. Files are sent with
nosniffand a sandbox policy so they cannot run anything in your admin. - To keep files outside the web folder entirely, add
define( 'NBWPAS_FEM_PRIVATE_DIR', '/path/outside/webroot' );towp-config.php.
When a file is not stored
The entry is still saved. The file is skipped, and a message is written to Tools / Diagnostics, when it is:
- larger than Settings > Files > Largest file kept (10 MB by default),
- a script or program type (
.php,.js,.exe,.html,.svgand similar), including a disguised name such asshell.php.txt, - missing, or the private folder is not writable.
If a stored file has been removed from the server, the entry shows file missing. Files can be deleted after a number of days (Settings > Files > Delete files after).