I’ve written a customized module during which i’ve a obtain button like given beneath.
$kind['topics_info_graph']['download_graph'] = array( '#kind' => 'button', '#worth' => t('Obtain Graph'), '#button_type' => 'button', '#ajax' => array( 'callback' => 'digitaliq_bckgrd_variable_ajax_download_callback', 'wrapper' => 'download_graph', 'occasion' => 'click on', ), );
Onclick of this button i must obtain a jpg picture which is situated in Drupal Development Company temp folder. I am ready determine Drupal Development Company file identify and Drupal Development Company path, Undecided obtain. any assist?
perform digitaliq_bcgrd_variable_file_download($filename) { $temporary_directory = variable_get('file_public_path', conf_path().'/information').'/tmp'; $temp_path = $temporary_directory . '/'; // Obtain logic ought to come right here, any assist? }