Title: Store file uploads for Contact Form 7
Author: mirceatm
Published: <strong>28.02.2020</strong>
Last modified: 22.05.2026

---

Поиск плагинов

![](https://ps.w.org/store-file-uploads-for-contact-form-7/assets/banner-772x250.
png?rev=3543950)

![](https://ps.w.org/store-file-uploads-for-contact-form-7/assets/icon-256x256.png?
rev=3543950)

# Store file uploads for Contact Form 7

 Автор: [mirceatm](https://profiles.wordpress.org/mirceatm/)

[Скачать](https://downloads.wordpress.org/plugin/store-file-uploads-for-contact-form-7.1.3.0.zip)

 * [Детали](https://ru.wordpress.org/plugins/store-file-uploads-for-contact-form-7/#description)
 * [Отзывы](https://ru.wordpress.org/plugins/store-file-uploads-for-contact-form-7/#reviews)
 *  [Установка](https://ru.wordpress.org/plugins/store-file-uploads-for-contact-form-7/#installation)
 * [Разработка](https://ru.wordpress.org/plugins/store-file-uploads-for-contact-form-7/#developers)

 [Поддержка](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/)

## Описание

By default, [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) dose
not keep data it sends trough it’s contact forms.
 While plugins like [Flamingo](https://wordpress.org/plugins/flamingo/)
save that data, uploaded files are not added to Media Library. This plugin will 
save uploaded files to Media Library before email is sent by CF7. This plugin will
raise an event with the the full file path & name. Subscribe to `nmr_create_attachment_file_name`
filter to get and/or update data before attachment is added to media library.

    ```
    // The filter callback function.
    function example_callback( $file_name ) {
        // (maybe) modify $file_name.
        return $file_name;
    }
    add_filter( 'nmr_create_attachment_file_name', 'example_callback', 10, 1 );
    ```

Subscribe to `nmr_before_insert_attachment` filter to be able to change attachment
attributes: caption and description are ‘post_excerpt’ and ‘post_content’.
 For 
other attributes, check documentation for [wp_insert_attachment](https://developer.wordpress.org/reference/functions/wp_insert_attachment/).

    ```
    // The filter callback function.
    function before_insert_attachment_callback( $attachment ) {
        // (maybe) modify $attachment array.
        return $attachment;
    }
    add_filter( 'nmr_before_insert_attachment', 'before_insert_attachment_callback', 10, 1 );
    ```

Optionally, subscribe to `nmr_should_skip_save_attachment_to_media_library` filter
to be able to skip saving the attachment to media library: return true to skip, 
false is the default behaviour that saves the attachment to media library. Filter`
nmr_before_insert_attachment` will not be called if skip was true.

    ```
    // The filter callback function.
    function skip_media_library_callback( $skip_save_to_media_library ) {
        // return true to skip saving to Media Library, false to save.
        return true;
    }
    add_filter( 'nmr_should_skip_save_attachment_to_media_library', 'skip_media_library_callback', 10, 1 );
    ```

This plugin will send the final attachment id if you are interested in getting other
details, like attachment url.
 Listen to `nmr_create_attachment_id_generated` action.

    ```
    // The action callback function.
    function example_callback_id_generated( $attachment_id ) {
        // (maybe) do something with the args.
        $url = wp_get_attachment_url( $attachment_id );
    }
    add_action( 'nmr_create_attachment_id_generated', 'example_callback_id_generated', 10, 1 );
    ```

#### Docs & Support

Check the [support forum](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/)
on WordPress.org. If you can’t locate any topics that pertain to your particular
issue, post a new topic for it.

#### Store file uploads for Contact Form 7 Needs Your Support

It is hard to continue development and support for this free plugin without contributions
from users like you. If you enjoy using -Store file uploads for Contact Form 7- 
and find it useful, please consider [**making a donation**](https://paypal.me/mirceatm).
Your donation will help encourage and support the plugin’s continued development
and better user support.

#### Privacy Notices

With the default configuration, this plugin, in itself, does not:

 * track users by stealth;
 * write any user personal data to the database;
 * send any data to external servers;
 * use cookies.

It will, however store uploaded files trough Contact Form 7 in WordPress Media Library.

Make sure your website users are aware of this fact!!!

### Pro Version

Need more? The **Pro version** adds 13 features:

 * Per-form control — choose which forms save files, set custom folder and rename
   pattern per form
 * Auto-rename — rename files using patterns like `{name}-{date}.{ext}` from other
   CF7 fields
 * Unique filenames — automatically avoid overwriting files with the same name
 * Custom upload folder — save files to a specific subfolder per form
 * File URL in email — replace `[file]` mail tag with a clickable link instead of
   an attachment
 * Skip-mail compatibility — save files even when CF7’s `skip_mail: on` is set
 * Upload log — admin screen listing every uploaded file with form, date, size, 
   and download link
 * Private files — store files outside the Media Library with access protection
 * Admin notification — receive an email with file link on every upload
 * Flamingo integration — link uploaded files to Flamingo inbound message entries
 * Auto-delete — remove uploads older than a configurable number of days
 * Image resize / compress — resize and compress images on upload
 * Duplicate detection — skip saving if the same file was already uploaded (MD5 
   check)

[Get Pro →](https://namir.ro/downloads/store-file-uploads-for-contact-form-7-pro/)

## Скриншоты

[⌊Settings tab — per-form control (save toggle, custom folder, rename pattern per
form), global options, and developer hooks info. Pro features shown as locked preview.⌉⌊
Settings tab — per-form control (save toggle, custom folder, rename pattern per 
form), global options, and developer hooks info. Pro features shown as locked preview
.⌉[

Settings tab — per-form control (save toggle, custom folder, rename pattern per 
form), global options, and developer hooks info. Pro features shown as locked preview.

[⌊Upload Log tab (Pro) — every CF7 file upload listed with form name, field, date,
file size, and a direct view/download link.⌉⌊Upload Log tab (Pro) — every CF7 file
upload listed with form name, field, date, file size, and a direct view/download
link.⌉[

Upload Log tab (Pro) — every CF7 file upload listed with form name, field, date,
file size, and a direct view/download link.

## Установка

 1. Upload the entire folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.

After that check Media Library for uploaded files.

## Отзывы

![](https://secure.gravatar.com/avatar/cee994e79252db6cb55602b7cfa2bff6cc52d17e0e6233737a4ce4404cab9550?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-41440/)󠁿

 [solanum](https://profiles.wordpress.org/solanum/) 21.04.2026

I use this plugin on several websites and never had any problems! It works just 
great.

![](https://secure.gravatar.com/avatar/1f34996519b256eb3978e41ea938e0bceb7480773011726d6bb73d5847a43d82?
s=60&d=retro&r=g)

### 󠀁[Thanks!](https://wordpress.org/support/topic/thanks-2355/)󠁿

 [benjamintoth](https://profiles.wordpress.org/benjamintoth/) 25.01.2023

Works as expected out of the box.

![](https://secure.gravatar.com/avatar/b63f473581cc44ad4460c20dbed3a87076de3916a5071ea72f511d793c646e5c?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-35351/)󠁿

 [jakubborek](https://profiles.wordpress.org/jakubborek/) 25.10.2022

Solved my issue without problem, works fine from installation

![](https://secure.gravatar.com/avatar/672f19f899486f6a74f199fb3b2c8403c65ae6dcad34942e55abd5faedf8b478?
s=60&d=retro&r=g)

### 󠀁[Getting Error Call to undefined function wp_read_audio_metadata](https://wordpress.org/support/topic/getting-error-call-to-undefined-function-wp_read_audio_metadata/)󠁿

 [mrkhanakia](https://profiles.wordpress.org/mrkhanakia/) 02.12.2021 1 ответ

I am getting error while submitting to CF7. Note: I am trying to upload MP3 files
<pre>fatal error: Array ( [type] => 1 [message] => Uncaught Error: Call to undefined
function wp_read_audio_metadata() in /home/theuxm/html/wp-admin/includes/image.php:
489 Stack trace: #0 /home/theuxm/html/wp-content/plugins/store-file-uploads-for-
contact-form-7/store-file-uploads-for-contact-form-7.php(39): wp_generate_attachment_metadata()#
1 /home/theuxm/html/wp-content/plugins/store-file-uploads-for-contact-form-7/store-
file-uploads-for-contact-form-7.php(55): nmr_create_attachment() #2 /home/theuxm/
html/wp-includes/class-wp-hook.php(305): nmr_on_before_cf7_send_mail() #3 /home/
theuxm/html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /home/
theuxm/html/wp-includes/plugin.php(518): WP_Hook->do_action() #5 /home/theuxm/html/
wp-content/plugins/contact-form-7/includes/submission.php(617): do_action_ref_array()#
6 /home/theuxm/html/wp-content/plugins/contact-form-7/includes/submission.php(86):
WPCF7_Submission->before_send_mail() #7 /home/theuxm/html/wp-content/plugins/contact-
form-7/includes/submission.php(27): WPCF7_Submission->proceed() #8 [file] => /home/
theuxm/html/wp-admin/includes/image.php [line] => 489 ) </pre>

![](https://secure.gravatar.com/avatar/62eb8952eb41d6eec64103955b5ca8d631db876c75fb589da3066f8f097b89d3?
s=60&d=retro&r=g)

### 󠀁[Works](https://wordpress.org/support/topic/works-1922/)󠁿

 [Inna Klementjeva](https://profiles.wordpress.org/windseeking/) 19.07.2021

It works and that's it

![](https://secure.gravatar.com/avatar/af565b51f0f9af329821e15ab2b0848e923fb41302d4acec07b27eb0bc0c6cf4?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-10440/)󠁿

 [alexwbaumann](https://profiles.wordpress.org/alexwbaumann/) 03.03.2021

Thanks! I spent a day wondering why the temporary file was not longer there then
another day finding out that CF7 is moving that file. So this is exactly what I 
was trying to figure out. It does look like files could be overwritten if they are
uploaded with an existing name. You can probably do something like the following
to ensure files get unique names and are not overwritten. // Get the path to the
upload directory. $wp_upload_dir = wp_upload_dir(); $upload_path = $wp_upload_dir['
path']; $unique_filename = wp_unique_filename($upload_path, basename($filename));
$attachFileName = $upload_path . '/' . $unique_filename; copy($filename, $attachFileName);//
Prepare an array of post data for the attachment. $attachment = array( 'guid' =>
$attachFileName, 'post_mime_type' => $filetype['type'], 'post_title' => preg_replace('/\.[
^.]+$/', '', $unique_filename), 'post_content' => '', 'post_status' => 'inherit');

 [ Посмотреть все 7 отзывов ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/)

## Участники и разработчики

«Store file uploads for Contact Form 7» — проект с открытым исходным кодом. В развитие
плагина внесли свой вклад следующие участники:

Участники

 *   [ mirceatm ](https://profiles.wordpress.org/mirceatm/)

«Store file uploads for Contact Form 7» переведён на 6 языков. Благодарим [переводчиков](https://translate.wordpress.org/projects/wp-plugins/store-file-uploads-for-contact-form-7/contributors)
за их работу.

[Перевести «Store file uploads for Contact Form 7» на ваш язык.](https://translate.wordpress.org/projects/wp-plugins/store-file-uploads-for-contact-form-7)

### Заинтересованы в разработке?

[Посмотрите код](https://plugins.trac.wordpress.org/browser/store-file-uploads-for-contact-form-7/),
проверьте [SVN репозиторий](https://plugins.svn.wordpress.org/store-file-uploads-for-contact-form-7/),
или подпишитесь на [журнал разработки](https://plugins.trac.wordpress.org/log/store-file-uploads-for-contact-form-7/)
по [RSS](https://plugins.trac.wordpress.org/log/store-file-uploads-for-contact-form-7/?limit=100&mode=stop_on_copy&format=rss).

## Журнал изменений

#### 1.3.0

 * Added Pro upsell admin page (Settings > Store CF7 Uploads) showing locked Pro
   features

#### 1.2.3

Add support for skipping saving to Media Library by using `nmr_should_skip_save_attachment_to_media_library`
filter

#### 1.2.2

Add support for changing attachment attributes using `nmr_before_insert_attachment`
filter

#### 1.2.1

 * Added support for media uploads (including mp3)

#### 1.2.0

 * Added filter `nmr_create_attachment_file_name` and action `nmr_create_attachment_id_generated`

#### 1.1.0

 * Contact Form 7 `WPCF7_Submission::get_instance()->uploaded_files` changed in 
   CF7 5.4, so adjustments in this plugin were needed.

#### 1.0.0

 * First version.

## Мета

 *  Версия **1.3.0**
 *  Обновление: **5 месяцев назад**
 *  Активных установок: **1 000+**
 *  Версия WordPress ** 4.9 или выше **
 *  Совместим вплоть до: **7.0.7**
 *  Языки
 * [English (US)](https://wordpress.org/plugins/store-file-uploads-for-contact-form-7/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/store-file-uploads-for-contact-form-7/),
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/store-file-uploads-for-contact-form-7/),
   [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/store-file-uploads-for-contact-form-7/),
   [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/store-file-uploads-for-contact-form-7/),
   [Spanish (Spain)](https://es.wordpress.org/plugins/store-file-uploads-for-contact-form-7/)
   и [Spanish (Venezuela)](https://ve.wordpress.org/plugins/store-file-uploads-for-contact-form-7/).
 *  [Перевести на ваш язык](https://translate.wordpress.org/projects/wp-plugins/store-file-uploads-for-contact-form-7)
 * Метки:
 * [contact](https://ru.wordpress.org/plugins/tags/contact/)[file](https://ru.wordpress.org/plugins/tags/file/)
   [form](https://ru.wordpress.org/plugins/tags/form/)[library](https://ru.wordpress.org/plugins/tags/library/)
   [upload](https://ru.wordpress.org/plugins/tags/upload/)
 *  [Дополнительно](https://ru.wordpress.org/plugins/store-file-uploads-for-contact-form-7/advanced/)

## Оценки

 5 из 5 звёзд.

 *  [  7 5-звездный отзыв     ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/?filter=5)
 *  [  0 4-звездный отзыв     ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/?filter=4)
 *  [  0 3-звездный отзыв     ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/?filter=3)
 *  [  0 2-звездный отзыв     ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/?filter=2)
 *  [  0 1-звездный отзыв     ](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/?filter=1)

[Ваш отзыв](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/#new-post)

[Посмотреть всеотзывы](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/reviews/)

## Участники

 *   [ mirceatm ](https://profiles.wordpress.org/mirceatm/)

## Поддержка

Есть что сказать? Нужна помощь?

 [Перейти в форум поддержки](https://wordpress.org/support/plugin/store-file-uploads-for-contact-form-7/)

## Пожертвование

Хотите поддержать улучшение этого плагина?

 [ Пожертвовать на развитие плагина ](https://paypal.me/mirceatm)