You can get direct download link using [download_link_extended]
I have used this one its generating this code.
<i class=””></i>Download
I want to use absolute path in Player.
This path “http://localhost/wordpress/?wpdmdl=77” works fine in Firefox and play the mp3 file in player. but when i run website in Chrome then I got error “Not Loading”. That’s y I need direct path of mp3 file.
According to the documentation, you can use get_package_data($package_id, ‘package_dir’)
, however this does not return anything for me.
Is there another way to get the full path? (NOT the download link)
To get file path, you need to use:
$files = get_package_data($package_id, "files");
$filepath = $files[0];
if(!file_exists($filepath)) $filepath = UPLOAD_DIR.$filepath;
Now $filepath
variable has the absolute path of attached file.