Skip to content

Commit

Permalink
Merge pull request iNextrix#719 from iNextrix/ASTPPCOM-1398_did.csv
Browse files Browse the repository at this point in the history
[FIX]An issue with download of csv smaple file in DID section
  • Loading branch information
devangn authored Oct 18, 2023
2 parents 3e73af8 + 4d2bbb7 commit 2576c52
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,9 @@ function customer_did($accountid, $accounttype)
function did_download_sample_file($file_name)
{
$this->load->helper('download');
$full_path = base_url() . "assets/Rates_File/" . $file_name . ".csv";
// ASTPPCOM-1398 mittal start
$full_path = "./assets/Rates_File/" . $file_name . ".csv";
// ASTPPCOM-1398 mittal end
ob_clean();
$arrContextOptions = array(
"ssl" => array(
Expand All @@ -745,7 +747,9 @@ function did_download_sample_file($file_name)
)
);
$file = file_get_contents($full_path, false, stream_context_create($arrContextOptions));
force_download(gettext("samplefile.csv"), $file);
// ASTPPCOM-1398 mittal start
force_download($file_name.".csv", $file);
// ASTPPCOM-1398 mittal start
}

/*
Expand Down

0 comments on commit 2576c52

Please sign in to comment.