Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16979 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16979 Rev 17002
Línea 785... Línea 785...
785
                    $mime_type = mime_content_type($message_tmp_filename);
785
                    $mime_type = mime_content_type($message_tmp_filename);
Línea 786... Línea 786...
786
 
786
 
787
 
787
 
788
                    if ($mime_type == 'image/jpg' || $mime_type == 'image/jpeg' || $mime_type == 'image/png') {
788
                    if ($mime_type == 'image/jpg' || $mime_type == 'image/jpeg' || $mime_type == 'image/png') {
789
                        $type = Message::TYPE_IMAGE;
789
                        $type = Message::TYPE_IMAGE;
790
                    } else if ($mime_type == 'video/quicktime' || $mime_type == 'video/webm' || $mime_type == 'video/mpeg' || $mime_type == 'video/mpg' || $mime_type == 'video/mp4') {
790
                    } else if ($mime_type == 'video/webm' || $mime_type == 'video/mpeg' || $mime_type == 'video/mpg' || $mime_type == 'video/mp4') {
791
                        $type = Message::TYPE_VIDEO;
791
                        $type = Message::TYPE_VIDEO;
792
                    } else if ($mime_type == 'application/pdf') {
792
                    } else if ($mime_type == 'application/pdf') {
793
                        $type = Message::TYPE_DOCUMENT;
793
                        $type = Message::TYPE_DOCUMENT;
Línea 819... Línea 819...
819
 
819
 
820
                    if ($type == Message::TYPE_DOCUMENT) {
820
                    if ($type == Message::TYPE_DOCUMENT) {
821
                        try {
821
                        try {
822
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
822
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
823
                            if (!file_exists($target_path)) {
823
                            if (!file_exists($target_path)) {
824
                                mkdir($target_path, 0755, true);
824
                                mkdir($target_path, 0755);
Línea 825... Línea 825...
825
                            }
825
                            }
826
 
826
 
827
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
827
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
Línea 848... Línea 848...
848
                    }
848
                    }
849
                    if ($type == Message::TYPE_IMAGE) {
849
                    if ($type == Message::TYPE_IMAGE) {
850
                        try {
850
                        try {
851
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
851
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
852
                            if (!file_exists($target_path)) {
852
                            if (!file_exists($target_path)) {
853
                                mkdir($target_path, 0755, true);
853
                                mkdir($target_path, 0755);
854
                            }
854
                            }
Línea 855... Línea 855...
855
 
855
 
Línea 856... Línea 856...
856
                            list($target_width, $target_height) = explode('x', $this->config['leaderslinked.image_sizes.message_image_size']);
856
                            list($target_width, $target_height) = explode('x', $this->config['leaderslinked.image_sizes.message_image_size']);
Línea 871... Línea 871...
871
                    }
871
                    }
872
                    if ($type == Message::TYPE_VIDEO) {
872
                    if ($type == Message::TYPE_VIDEO) {
873
                        try {
873
                        try {
874
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
874
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
875
                            if (!file_exists($target_path)) {
875
                            if (!file_exists($target_path)) {
876
                                mkdir($target_path, 0755, true);
876
                                mkdir($target_path, 0755);
877
                            }
877
                            }
Línea 878... Línea 878...
878
 
878
 
Línea 879... Línea 879...
879
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
879
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;