Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $img = $this->getRequest()->getData('image');
- $folderPath = '\\ts-rackstation\Shared\Doyle\PROGRAMMERS\pics\Staff\';
- if (!filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN)) {
- $folderPath = '\\ts-rackstation\pics\Staff\';
- }
- $image_parts = explode(";base64,", $img);
- $image_base64 = base64_decode($image_parts[1]);
- $newImage = imagescale($image_base64, 322, 255, IMG_BICUBIC_FIXED);
- $fileName = $employeeSelections['employee'] . '.jpg';
- $file = $folderPath . $fileName;
- file_put_contents($file, $newImage);
- file_put_contents($file, $img);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement