Hey Shahriar, sorry if I wasn’t clear in my previous message. Between the time I sent in first ticket today, and your reply I made the changes in the code sample above. That FIXED MY ISSUE and caused the files to download with the file name IE (filename.zip) instead of 015265498.zip.
When I updated to latest version last week, the functionality to use file name was overwritten. The code looks different so I sent in a ticket asking for help, but figured it out myself. WITHOUT the fix I applied, I was getting downloads with names like 015265498.zip
We have only one file per package. Here is a link -> https://ninjatraderecosystem.com/user-app-share-download/pricevoice/
I was able to modify it from code previously sent like this:
$filepath = str_replace(‘\\’,’/’, $filepath );
$filename = wpdm_basename($filepath);
//modified to get the file name instead of random number
$tmparr = explode(‘.’, $filename );
$filename = get_the_title( $package[‘ID’] ) . “.” . end($tmparr);
wpdm_download_file($filepath, $filename, $speed, 1, $package);
Is there a better way to do this? Also, you had previously said a filter with the ability to use the download file name would be added to the front end, is that still a possibility?
This code no longer works in the latest update. The code block is now:
//$plock = get_wpdm_meta($file[‘id’],’password_lock’,true);
//$fileinfo = get_wpdm_meta($package[‘id’],’fileinfo’);
$filepath = str_replace(‘\\’,’/’, $filepath );
$filename = wpdm_basename($filepath);
$filename = preg_replace(“/([0-9]+)[wpdm]+_/”, “”, $filename);
wpdm_download_file($filepath, $filename, $speed, 1, $package);
//@unlink($filepath);
What do I modify to use the file name instead of the string of numbers as before?
We had to add rel=”noreferrer” to our links on external domains. Is there a better solution or setting we can adjust on the WPDM side so I don’t have to add the rel tag to all links on other domains we own?
WPDM admin did something and sent an email telling me to try again, I did and it worked. Wish there was more to it, but thats what resolved my issue.
Scott, can confirm you won’t lose any data – I didn’t. You have to deactivate the plug in, delete it (make sure it is deleted in your directory via ftp) then upload new one. Not ideal, but it is what it is.