clean data on images
Showing
3 changed files
with
8 additions
and
5 deletions
| ... | @@ -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"; |
| ... | @@ -48,6 +48,8 @@ | ... | @@ -48,6 +48,8 @@ |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | |||
| 52 | |||
| 51 | function offFocus(id) { | 53 | function offFocus(id) { |
| 52 | 54 | ||
| 53 | 55 | ... | ... |
-
Please register or sign in to post a comment