Title: Upload Path Modification
Last modified: January 23, 2019

---

# Upload Path Modification

 *  Resolved [50M](https://wordpress.org/support/users/50m/)
 * (@50m)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/)
 * What am I missing here?
 * I added the following code to change the upload path/folder for form ID 12. When
   I test the form by uploading a file, the file name shows up in the entries list
   and is linked to the right file path, however the file is not actually there,
   i.e. it’s not there when looking via FTP client and clicking the link to the 
   file returns a 404. It’s like it’s partially working, but writing the file to
   the location fails. Here’s the code I added to the functions.php file:
 * add_filter( ‘frm_upload_folder’, ‘frm_custom_upload’, 10, 2 );
    function frm_custom_upload(
   $folder, $atts ) { if ( $atts[‘form_id’] == 12 ) { // change to your form id 
   $folder = $folder . ‘../wp-content/uploads/product_images/’; } return $folder;}

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [James Pond](https://wordpress.org/support/users/jamesponddotco/)
 * (@jamesponddotco)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11123289)
 * Hi,
 * The correct code should look like this:
 *     ```
       add_filter( ‘frm_upload_folder’, ‘frm_custom_upload’, 10, 2 );
       function frm_custom_upload( $folder, $atts ) {
         if ( $atts[‘form_id’] == 12 ) { // change to your form id
           $folder = $folder . ‘/wp-content/uploads/product_images/’;
         }
         return $folder;
       }
       ```
   
 * Just keep in mind that the hook ‘frm_upload_folder’ is used to organise files
   inside ‘/wp-content/uploads/formidable/’, not to allow you to upload files outside
   of that directory.
 * So using the path and form ID you used, the directory structure would look like
   this in the end: ‘/wp-content/uploads/formidable/12/wp-content/uploads/product_images/’
 * You can see more information and examples within our documentation:
    [https://formidableforms.com/knowledgebase/frm_upload_folder/](https://formidableforms.com/knowledgebase/frm_upload_folder/)
 * Please let us know if you have any additional questions.
 *  Thread Starter [50M](https://wordpress.org/support/users/50m/)
 * (@50m)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11123426)
 * Thanks.
 * Is there any way to force it to upload to the folder I specified (../wp-content/
   uploads/product_images/), which is the product_images folder I have located in
   the uploads folder?
 *  Thread Starter [50M](https://wordpress.org/support/users/50m/)
 * (@50m)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11123428)
 * I don’t need or want the images to show up in the media library either, if that
   helps.
 *  Plugin Author [Steve Wells](https://wordpress.org/support/users/srwells/)
 * (@srwells)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11123560)
 * Hi there. Can you please create a ticket from our support page? The WordPress
   moderators don’t like us to provide support for our pro version on WordPress.
   org.
 * A new ticket can be created here: [https://formidableforms.com/new-topic/](https://formidableforms.com/new-topic/)
 *  Thread Starter [50M](https://wordpress.org/support/users/50m/)
 * (@50m)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11123961)
 * Okay, I just opened a ticket at the link you provided. Thank you!
 *  Plugin Author [Steve Wells](https://wordpress.org/support/users/srwells/)
 * (@srwells)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11124004)
 * Perfect. We’ll look for your question there. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Upload Path Modification’ is closed to new replies.

 * ![](https://ps.w.org/formidable/assets/icon-256x256.png?rev=2588749)
 * [Formidable Forms - Contact Form Plugin, Survey, Quiz, Payment, Calculator Form & Custom Form Builder](https://wordpress.org/plugins/formidable/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/formidable/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/formidable/)
 * [Active Topics](https://wordpress.org/support/plugin/formidable/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/formidable/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/formidable/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Steve Wells](https://wordpress.org/support/users/srwells/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/upload-path-modification/#post-11124004)
 * Status: resolved