Support » Plugin: Custom Upload Dir » Gravity forms?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Have you tried it?

    I use Gravity Forms and you could simply set Gravity Forms to upload to the path you want, and not worry about having to set anything with this plugin ‘to work with’ another plugin.. if that makes sense to you. The point is to not try and make another plugin work with or rely on another = limits your probs should ONE of them not work / gets updated / you uninstall one / etc.

    So you could simply use:

    <?php
    add_filter("gform_upload_path", "change_upload_path", 10, 2);
    function change_upload_path($path_info, $form_id){
       $path_info["path"] = "/home/public_html/yourdomainfolder/new/path/";
       $path_info["url"] = "http://yourdomainhere.com/new/path/";
       return $path_info;
    }
    ?>

    The above is called a filter, you put that in your theme’s function.php

    Also, at minimum security I would drop a blank index.html file in that folder also. There are a number of other ways to more soundly protect someone from directly listing the folder, the blank index is ONLY if someone tries the folder without calling on a file/page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gravity forms?’ is closed to new replies.