summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconvertfile.inc2
-rwxr-xr-xpspice_to_kicad.module8
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);
}