Title: Change the upload folder path
Last modified: October 11, 2023

---

# Change the upload folder path

 *  Resolved [schumiholic](https://wordpress.org/support/users/schumiholic/)
 * (@schumiholic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/)
 * Hi! Is it possible to change the folder location where the uploaded files are
   saved by default? I would like to have a different folder for uploaded files 
   for each form. How can I do that?

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

 *  [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * (@tahmidulkarim)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17118114)
 * Hi [@schumiholic](https://wordpress.org/support/users/schumiholic/),
 * There isn’t any direct option to change the folder location where the uploaded
   files are saved but you can change that using custom codes..
 * If you want to change the file upload location then you can do that using the
   filter hook –
 *     ```wp-block-code
       add_filter('fluentform/file_upload_options', function ($locations){
   
          // Do your stuff here
       }, 10, 1);
       ```
   
 * Thank you!
 *  Thread Starter [schumiholic](https://wordpress.org/support/users/schumiholic/)
 * (@schumiholic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17118418)
 * Where do I add this code, in the functions.php file? And how do I add the location
   in the format ‘example.com/upload-folder’?
 *  Plugin Author [Lukman Nakib](https://wordpress.org/support/users/pyrobd/)
 * (@pyrobd)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17119489)
 * Check this link ,its been updated
 * [https://fluentforms.com/docs/fluentform_default_upload_path](https://fluentforms.com/docs/fluentform_default_upload_path)/
 *  Thread Starter [schumiholic](https://wordpress.org/support/users/schumiholic/)
 * (@schumiholic)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17120081)
 * I’ve been trying to adapt the code to my needs, but something is not working 
   right. What I am trying to achieve is for a specific form (id 7 in this case),
   the images to upload in a specific folder (competitions in this case). The if
   function is not working. Can you please tell me what I need to modify?
 *     ```wp-block-code
       add_filter('fluentform/default_upload_path', function ($path, $form) {
           $form_id = $form->id;
   
           if ($form_id == 7) {
               return wp_upload_dir()['basedir'] . '/competitions';
           }
   
           return $path;
       }, 10, 2);
       ```
   
 *  [Md Delwar](https://wordpress.org/support/users/hrdelwar/)
 * (@hrdelwar)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17135578)
 * Hello Schumiholic, sorry for delay. Somehow $form->id was null when uploading
   file or image, we will fix it our latter release. If possible just make it’s 
   simple, forget about form id condition and make sure File Upload Location is 
   set as “Fluent Forms Default”. If it’s mandatory to check ($form_id == 7) you
   can create a support ticket [here ](https://support.wpmanageninja.com/#/tickets)
   to get fixed version.
 *     ```wp-block-code
       add_filter('fluentform/default_upload_path', function($path, $form) {
           return wp_upload_dir()['basedir'] . '/competitions';
       }, 10, 2);
       ```
   

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

The topic ‘Change the upload folder path’ is closed to new replies.

 * ![](https://ps.w.org/fluentform/assets/icon-256x256.png?rev=3354580)
 * [Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder](https://wordpress.org/plugins/fluentform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluentform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluentform/)
 * [Active Topics](https://wordpress.org/support/plugin/fluentform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluentform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluentform/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [Md Delwar](https://wordpress.org/support/users/hrdelwar/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/change-the-upload-folder-path/#post-17135578)
 * Status: resolved