f2065
Forum Replies Created
-
Forum: Plugins
In reply to: [Download Monitor] i can’t dowmnload a file from a mobil phoneOn my phone, this file is downloaded normally. The reason is probably related to your browser and its handler Content-Type: application/pdf
Specify the name and exact version of the browser.
Try other browsers.
Try another provider (WiFi, LTE) – the HTTPS-request may be blocked by the firewall on the router for some reason.Forum: Plugins
In reply to: [Download Monitor] Open in new tabShow your button template.
This is done using the parameter<a … target="_blank">
Forum: Plugins
In reply to: [Download Monitor] Force Download@mrmatthewsg
The problem (more precisely, the peculiarity of browsers) is related to Content-Type.
Install the WP Add Mime Types plugin
And for those extensions that should unconditionally download to a file (not open in a browser), specify the value application/x-force-download.
For example:zip = application/x-force-download pdf = application/x-force-download doc = application/x-force-download 7z = application/x-force-download rar = application/x-force-download mp4 = application/x-force-download mkv = application/x-force-download
Forum: Plugins
In reply to: [Download Monitor] Custom template to include file dateYour code doesn’t work because your editor has corrupted the quotes.
<?php /** * Shows date and title only. */ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly ?> <a class="download-link" title="<?php if ( $dlm_download->get_version()->has_version_number() ) { printf( esc_html__( 'Version %s', 'download-monitor' ), esc_html( $dlm_download->get_version()->get_version_number() ) ); } ?>" href="<?php esc_url( $dlm_download->the_download_link() ); ?>" rel="nofollow"> <?php echo date("Y-m-d",$dlm_download->get_version()->get_date()->format( 'U' )); echo ' – '; $dlm_download->the_title(); ?> </a>
Forum: Plugins
In reply to: [Download Monitor] Custom template to include file dateThe first echo works if the time is 00:00 – so as not to display it.
This was not the complete code, it is only part of the template.
You need something like this template:<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <p><a class="aligncenter download-button" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow"> <?php echo date("Y-m-d",$dlm_download->get_version()->get_date()->format( 'U' )); echo ' – '; printf( esc_html__( 'Download “%s”', 'download-monitor' ), $dlm_download->get_version()->get_filename() ); ?> </a></p>
Forum: Plugins
In reply to: [Download Monitor] Custom template to include file dateif (date(“Hi”,$dlm_download->get_version()->get_date()->format( ‘U’ )) == ‘0000’)
{
echo date(“Y-m-d”,$dlm_download->get_version()->get_date()->format( ‘U’ ));
}
else
{
echo date(“Y-m-d H:i”,$dlm_download->get_version()->get_date()->format( ‘U’ ));
}I downloaded current version 4.5.92, the problem is solved, the files are downloaded without damage, the download does not freeze. Thanks.
Forum: Plugins
In reply to: [Download Monitor] Multithreaded download corrupts files.plugin uses PHP to serve a download. This will not work when the file is split.
But why does editing the plugin solve this problem?
After replacing the lines with
$new_length=($range_end-$range)+1 and $this->readfile_chunked($file_path,false,$range) – multithreaded downloading starts working correctly.
In this solution, there is some other problem?
Or why don’t you do the same?