WPChill / download-monitor

A WordPress plugin which provides an intuitive UI for uploading and managing downloadable files (including support for multiple versions), inserting download links into posts & logging downloads.
http://wordpress.org/extend/plugins/download-monitor/
262 stars 117 forks source link

Use $upload_path instead of construction the upload path: Update clas… #1539

Closed acesuares closed 2 months ago

acesuares commented 2 months ago

…s-dlm-downloads-path.php

The upload Path is constructed in this line

$uploads = WP_CONTENT_DIR . '/uploads/sites/' . $site_id;

But the upload path can vary in different installations.

Maybe it's easier to use the predefined variable $upload_path

See also https://developer.wordpress.org/reference/functions/wp_upload_dir/

Since I made that change, my downloads are working agaiin.

razvanaldea89 commented 2 months ago

I've switched the branches, and based on what you've found in the dlm downloads path issue we'll see how we integrate this fix.