We'll create fresh WordPress site with Store file uploads for Contact Form 7 installed. You have 20 minutes to test the plugin after that site we'll be deleted.
By default, Contact Form 7 dose not keep data it sends trough it’s contact forms.
While plugins like 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.
// The filter callback function.
function before_insert_attachment_callback( $attachment ) {
// (maybe) modify $attachment array.
return $attachment;
}
add_filter( 'before_insert_attachment_callback', 'example_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 );
Check the support forum on WordPress.org. If you can’t locate any topics that pertain to your particular issue, post a new topic for it.
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. Your donation will help encourage and support the plugin’s continued development and better user support.
With the default configuration, this plugin, in itself, does not:
It will, however store uploaded files trough Contact Form 7 in WordPress Media Library.
Make sure your website users are aware of this fact!!!