Title: Pixelboy45's Replies | WordPress.org

---

# Pixelboy45

  [  ](https://wordpress.org/support/users/pixelboy45/)

 *   [Profile](https://wordpress.org/support/users/pixelboy45/)
 *   [Topics Started](https://wordpress.org/support/users/pixelboy45/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pixelboy45/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pixelboy45/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pixelboy45/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pixelboy45/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pixelboy45/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Contact Form 7] [Plugin: Contact Form 7] Upload File Size](https://wordpress.org/support/topic/plugin-contact-form-7-upload-file-size/)
 *  [Pixelboy45](https://wordpress.org/support/users/pixelboy45/)
 * (@pixelboy45)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-contact-form-7-upload-file-size/#post-3128472)
 * Well this is what I did and it worked first go, successfully sent a 9 meg file.
 * Went to
 * public_html/wp-content/plugins/contact-form-7/modules/file.php
 * Saved a backup copy, and made a modified copy. In the modified copy I changed
   the file size from 1mb to 10mb, then added a zero after the 1 on all the instances
   of “$allowed_filesize = 1048576” “$allowed_size *= 1024” & “$allowed_size *= 
   1024 * 1024” saved it and pasted it over the original file.
 * Example modified code below
 *  $allowed_size = 10048576; // default size 10 MB
 *  foreach ( $options as $option ) {
    if ( preg_match( ‘%^filetypes:(.+)$%’, $option,
   $matches ) ) { $file_types = explode( ‘|’, $matches[1] ); foreach ( $file_types
   as $file_type ) { $file_type = trim( $file_type, ‘.’ ); $file_type = str_replace(
   array( ‘.’, ‘+’, ‘*’, ‘?’ ), array( ‘\.’, ‘\+’, ‘\*’, ‘\?’ ), $file_type ); $
   file_type_pattern .= ‘|’ . $file_type; }
 *  } elseif ( preg_match( ‘/^limit:([1-9][0-9]*)([kKmM]?[bB])?$/’, $option, $matches)){
   
   $allowed_size = (int) $matches[1];
 *  $kbmb = strtolower( $matches[2] );
    if ( ‘kb’ == $kbmb ) { $allowed_size *= 
   10024; } elseif ( ‘mb’ == $kbmb ) { $allowed_size *= 10024 * 10024;

Viewing 1 replies (of 1 total)