( ".__("attached file is missing/deleted",'download-manager')." )";
$afile = is_array($afiles)&&isset($afiles[0])?$afiles[0]:'';
$afile = trim($afile);
if($afile !=''){
if(strpos($afile, "://")){
$fparts = parse_url($afile);
$filesize = "
{$fparts['host']}";
}
else {
if (file_exists(UPLOAD_DIR . '/' . $afile))
$filesize = number_format(filesize(UPLOAD_DIR . '/' . $afile) / 1025, 2) . " KB";
else if (file_exists($afile))
$filesize = number_format(filesize($afile) / 1025, 2) . " KB";
}
if(strpos($afile, "#")) {
$afile = explode("#", $afile);
$afile = $afile[1];
}
?>
". __('No file uploaded yet!', 'download-manager').""; ?>
'html5,silverlight,flash,html4',
'browse_button' => 'plupload-browse-button',
'container' => 'plupload-upload-ui',
'drop_element' => 'drag-drop-area',
'file_data_name' => 'package_file',
'multiple_queues' => true,
'url' => admin_url('admin-ajax.php'),
'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
'filters' => array(array('title' => __('Allowed Files'), 'extensions' => '*')),
'multipart' => true,
'urlstream_upload' => true,
// additional post data to send to our ajax hook
'multipart_params' => array(
'_ajax_nonce' => wp_create_nonce(NONCE_KEY),
'action' => 'wpdm_admin_upload_file', // the ajax action name
),
);
if(get_option('__wpdm_chunk_upload',0) == 1){
$plupload_init['chunk_size'] = (int)get_option('__wpdm_chunk_size', 1024).'kb';
$plupload_init['max_retries'] = 3;
} else
$plupload_init['max_file_size'] = wp_max_upload_size().'b';
// we should probably not apply this filter, plugins may expect wp's media uploader...
$plupload_init = apply_filters('plupload_init', $plupload_init); ?>