• Resolved hwuser

    (@hwuser)


    Hello,

    I use this filter to change the url of the upoload folder of my images:

    add_filter(‘upload_dir’, ‘directorio_subida_fotos’);
    function directorio_subida_fotos( $param ){

    $post_id = get_the_ID();

    $mydir = “/” . $post_id;

    $param[‘path’] = $param[‘basedir’] . $mydir;
    $param[‘url’] = $param[‘baseurl’] . $mydir;

    return $param;
    }

    I want to put each photos in each folder by post id.
    It run well in my wordpres hosting.

    But not with your plugin with digital ocean, that put the photos in the month, year folder…

    Is any way to respect the wordpress folder in digital ocean?

    Thanks,
    Sergio

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom folder in digital ocean like in wordpress’ is closed to new replies.