|
1 | 1 | <?php
|
2 | 2 | /*
|
3 |
| - * jQuery File Upload Plugin PHP Class 5.18.6 |
| 3 | + * jQuery File Upload Plugin PHP Class 5.18.7 |
4 | 4 | * https://github.com/blueimp/jQuery-File-Upload
|
5 | 5 | *
|
6 | 6 | * Copyright 2010, Sebastian Tschan
|
@@ -53,6 +53,7 @@ function __construct($options = null, $initialize = true) {
|
53 | 53 | 'GET',
|
54 | 54 | 'POST',
|
55 | 55 | 'PUT',
|
| 56 | + 'PATCH', |
56 | 57 | 'DELETE'
|
57 | 58 | ),
|
58 | 59 | 'access_control_allow_headers' => array(
|
@@ -123,6 +124,8 @@ protected function initialize() {
|
123 | 124 | case 'GET':
|
124 | 125 | $this->get();
|
125 | 126 | break;
|
| 127 | + case 'PATCH': |
| 128 | + case 'PUT': |
126 | 129 | case 'POST':
|
127 | 130 | $this->post();
|
128 | 131 | break;
|
@@ -458,16 +461,16 @@ protected function orient_image($file_path) {
|
458 | 461 | $image = @imagecreatefromjpeg($file_path);
|
459 | 462 | switch ($orientation) {
|
460 | 463 | case 3:
|
461 |
| - $image = @imagerotate($image, 180, 0); |
462 |
| - break; |
| 464 | + $image = @imagerotate($image, 180, 0); |
| 465 | + break; |
463 | 466 | case 6:
|
464 |
| - $image = @imagerotate($image, 270, 0); |
465 |
| - break; |
| 467 | + $image = @imagerotate($image, 270, 0); |
| 468 | + break; |
466 | 469 | case 8:
|
467 |
| - $image = @imagerotate($image, 90, 0); |
468 |
| - break; |
| 470 | + $image = @imagerotate($image, 90, 0); |
| 471 | + break; |
469 | 472 | default:
|
470 |
| - return false; |
| 473 | + return false; |
471 | 474 | }
|
472 | 475 | $success = imagejpeg($image, $file_path);
|
473 | 476 | // Free up memory (imagedestroy does not delete files):
|
|
0 commit comments