76e79207 by Jeff Balicki

clean data on images

1 parent 1ba5f967
...@@ -118,11 +118,12 @@ class ApiController extends Controller ...@@ -118,11 +118,12 @@ class ApiController extends Controller
118 $folder = preg_replace('/[^A-Za-z0-9\-]/', '', $folder); 118 $folder = preg_replace('/[^A-Za-z0-9\-]/', '', $folder);
119 $fileLocation = $change->fileLocation; 119 $fileLocation = $change->fileLocation;
120 $file = explode('\\', $change->content); 120 $file = explode('\\', $change->content);
121 121 $file = end($file);
122 $fileClean = str_replace(' ', '-', $file);
122 $curl = new Curl(); 123 $curl = new Curl();
123 $curl->download($fileLocation.'/'.end($file), $storagePath . $folder . '/' . end($file)); 124 $curl->download($fileLocation.'/'.$fileClean , $storagePath . $folder . '/' . $fileClean);
124 $curl->close(); 125 $curl->close();
125 chmod( $storagePath . $folder . '/' . end($file), 0777); 126 chmod( $storagePath . $folder . '/' . $fileClean, 0777);
126 127
127 } 128 }
128 } 129 }
......
...@@ -135,7 +135,7 @@ try { ...@@ -135,7 +135,7 @@ try {
135 135
136 //Get image var from row 136 //Get image var from row
137 137
138 $imagefile = $row->folder . '/' . $row->content; 138 $imagefile = $row->folder . '/' . str_replace(' ', '-', $row->content);
139 $imgLUp = $row->locationUp; 139 $imgLUp = $row->locationUp;
140 $imgLRight = $row->locationRight; 140 $imgLRight = $row->locationRight;
141 $bw = $row->width; 141 $bw = $row->width;
......
1 1
2 2
3 // var pluginUrl = "http://localhost:8888/Forms"; 3 // var pluginUrl = "http://localhost:8888/Forms";
4 // var pdf_customizer = "http://localhost:8888/pdf-customizer/public"; 4 // var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
5 5
6 var pluginUrl = "http://contact.gotenzing.com"; 6 var pluginUrl = "http://contact.gotenzing.com";
7 var pdf_customizer = "http://pdf-customizer.synapsus.co"; 7 var pdf_customizer = "http://pdf-customizer.synapsus.co";
8 8
9 function getAuth() { 9 function getAuth() {
10 10
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
45 }); 45 });
46 46
47 } 47 }
48
49
48 50
49 51
50 52
......