Support » Plugin: Download Manager » Change upload directory

  • Resolved giusetavera

    (@giusetavera)


    Hi everyone. First of all, thanks for this plugin, found it great. Very nice job.

    Got just a simply question: I absolutely need to change the directory where to put my files. I mean:

    mysite.ext/download/ …
    By default it puts files in wp-content/upload while I prefer organizing all my zips etc in a directory which is external.

    Sorry for my bad english, hope someone will help me to fix this

    G

    https://wordpress.org/plugins/download-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You have to modify UPLOAD_DIR in download-manager.php file to your desire path.
    define('UPLOAD_DIR', $d . '/uploads/download-manager-files/');

    If you are happy please give us a 5* here https://wordpress.org/support/view/plugin-reviews/download-manager , that will inspire us a lot 🙂

    Thread Starter giusetavera

    (@giusetavera)

    I post my code here. In this why my files go in the directory I want (mysite.it/downloads) but when I delete the dm-post in my wordpress admin panel, that file is looks still in the directory. I mean, all work when I upload, not when I need to delete 🙁

    $dir = '/Applications/MAMP/htdocs/mysite';
    $d = str_replace('\\','/',$dir);
    
    define('WPDM_BASE_DIR',dirname(__FILE__).'/');
    define('WPDM_BASE_URL',plugins_url('/download-manager/'));
    
    define('UPLOAD_DIR',$d.'/downloads/');  
    
    define('WPDM_CACHE_DIR',dirname(__FILE__).'/cache/');  
    
    define('_DEL_DIR',$d.'/downloads');  
    
    define('UPLOAD_BASE',$d.'/downloads/');

    Although you delete the package but it may be involved with other packages and still in the server. So try to delete the file from server.

    Thread Starter giusetavera

    (@giusetavera)

    So the plugin does not delete the file from the server directly?!

    Yes, the plugin doesn’t delete the file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change upload directory’ is closed to new replies.