As Download Monitor to receive a direct link to the file?

Good morning.
Need to get a direct link to the file to open in browser instead of downloading.
Don't find this neither in the template nor in the settings
April 4th 20 at 13:26
1 answer
April 4th 20 at 13:28
occasionally when unloading the header
header( "Content-Disposition: inline" );

Well, Content-type corresponding

Example of loading xml
$content_disposition = isset($_GET['content_disposition']) ? $_GET['content_disposition'] : 'attachment';

 // Check that file exists.
 if ( ! file_exists( $'xml_filename' ) ) {
 exit( 0 );
}

 // The creation time of the file
 $file_time = filemtime( $opt['xml_filename' );

 if ('inline' === $content_disposition) {
 header( "Content-Disposition: inline" );
 header( "Content-type: text/xml; charset=utf-8", true, 200 );
 } else {
 header( "Content-type: application/xml", true, 200 );
 header( "Content-Disposition: attachment; filename=myxml" . date( "_d-m-Y_H:i:s", $file_time ) . ".xml" );
}
 header( "Pragma: no-cache" );
 header( "Expires: 0" );
 readfile( $xml_filename );
 exit( 0 );
Sorry, I did not understand.
And where it to register?
You mean this plugin?
https://wordpress.org/plugins/download-monitor/ - orville80 commented on April 4th 20 at 13:31
Sorry, I don't understand what You are asking about the plugin, and wrote a reply to upload code.
Please contact the support. Most likely that already had such requests and they will tell You the solution. - Tiara_Hilll commented on April 4th 20 at 13:34

Find more questions by tags WordPress