diff options
author | Prashant S | 2020-06-15 13:31:24 +0530 |
---|---|---|
committer | GitHub | 2020-06-15 13:31:24 +0530 |
commit | e39a033b25ee1544a3a6e09458febd43af2cd876 (patch) | |
tree | aaa831b64f04e5a8b436c96ac3abbd871931c89c | |
parent | c19534b6b4a30c9fcd6c2a49c0da854f76a228c9 (diff) | |
parent | c68698b24bcbad670725a69d7863e4ad477fef17 (diff) | |
download | Esim-Pspice-to-kicad-convertor-e39a033b25ee1544a3a6e09458febd43af2cd876.tar.gz Esim-Pspice-to-kicad-convertor-e39a033b25ee1544a3a6e09458febd43af2cd876.tar.bz2 Esim-Pspice-to-kicad-convertor-e39a033b25ee1544a3a6e09458febd43af2cd876.zip |
Merge pull request #2 from prashantsinalkar/master
fixed code
-rwxr-xr-x | convertfile.inc | 2 | ||||
-rwxr-xr-x | pspice_to_kicad.module | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/convertfile.inc b/convertfile.inc index a8aed41..76109a8 100755 --- a/convertfile.inc +++ b/convertfile.inc @@ -1,6 +1,6 @@ <?php -function pspice_to_kicad_convert_file() +function pspice_to_kicad_convert_test_file() { $upload_root_path = pspice_to_kicad_upload_path(); diff --git a/pspice_to_kicad.module b/pspice_to_kicad.module index bab44c4..3dae369 100755 --- a/pspice_to_kicad.module +++ b/pspice_to_kicad.module @@ -625,7 +625,7 @@ function pspice_to_kicad_convert_file() $filePath = $upload_root_path . "" . $row->upload_filepath; $uploadfolder = $row->uid; - exec("/var/www/html/esim_in/sites/all/modules/pspice_to_kicad/convert.sh " . $convert_root_path . " " . $filePath . " " . $uploadfolder, $outputFiles); + exec("./convert.sh" . " " . $convert_root_path . " " . $filePath . " " . $uploadfolder, $outputFiles); $file = $row->upload_filename; $filearray = explode('.', $file); @@ -646,6 +646,12 @@ function pspice_to_kicad_convert_file() header('Content-Type: ' . file_get_mimetype($converted_file)); header('Content-disposition: attachment; filename="' . $filenamewothoutext . ".zip" . '"'); header('Content-Length: ' . filesize($converted_file)); + header("Content-Transfer-Encoding: binary"); + header('Expires: 0'); + header('Pragma: no-cache'); + ob_end_flush(); + ob_clean(); + flush(); readfile($converted_file); } |