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 806... Línea 806...
806
                    $mime_type = mime_content_type($message_tmp_filename);
806
                    $mime_type = mime_content_type($message_tmp_filename);
Línea 807... Línea 807...
807
 
807
 
808
 
808
 
809
                    if ($mime_type == 'image/jpg' || $mime_type == 'image/jpeg' || $mime_type == 'image/png') {
809
                    if ($mime_type == 'image/jpg' || $mime_type == 'image/jpeg' || $mime_type == 'image/png') {
810
                        $type = Message::TYPE_IMAGE;
810
                        $type = Message::TYPE_IMAGE;
811
                    } else if ($mime_type == 'video/quicktime' ||  $mime_type == 'video/webm' || $mime_type == 'video/mpeg' || $mime_type == 'video/mpg' || $mime_type == 'video/mp4') {
811
                    } else if ($mime_type == 'video/webm' || $mime_type == 'video/mpeg' || $mime_type == 'video/mpg' || $mime_type == 'video/mp4') {
812
                        $type = Message::TYPE_VIDEO;
812
                        $type = Message::TYPE_VIDEO;
813
                    } else if ($mime_type == 'application/pdf') {
813
                    } else if ($mime_type == 'application/pdf') {
814
                        $type = Message::TYPE_DOCUMENT;
814
                        $type = Message::TYPE_DOCUMENT;
Línea 840... Línea 840...
840
 
840
 
841
                    if ($type == Message::TYPE_DOCUMENT) {
841
                    if ($type == Message::TYPE_DOCUMENT) {
842
                        try {
842
                        try {
843
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
843
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
844
                            if (!file_exists($target_path)) {
844
                            if (!file_exists($target_path)) {
845
                                mkdir($target_path, 0755, true);
845
                                mkdir($target_path, 0755);
Línea 846... Línea 846...
846
                            }
846
                            }
847
 
847
 
848
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
848
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
Línea 869... Línea 869...
869
                    }
869
                    }
870
                    if ($type == Message::TYPE_IMAGE) {
870
                    if ($type == Message::TYPE_IMAGE) {
871
                        try {
871
                        try {
872
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
872
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
873
                            if (!file_exists($target_path)) {
873
                            if (!file_exists($target_path)) {
874
                                mkdir($target_path, 0755, true);
874
                                mkdir($target_path, 0755);
875
                            }
875
                            }
Línea 876... Línea 876...
876
 
876
 
Línea 877... Línea 877...
877
                            list($target_width, $target_height) = explode('x', $this->config['leaderslinked.image_sizes.message_image_size']);
877
                            list($target_width, $target_height) = explode('x', $this->config['leaderslinked.image_sizes.message_image_size']);
Línea 892... Línea 892...
892
                    }
892
                    }
893
                    if ($type == Message::TYPE_VIDEO) {
893
                    if ($type == Message::TYPE_VIDEO) {
894
                        try {
894
                        try {
895
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
895
                            $target_path = $this->config['leaderslinked.fullpath.message'] . DIRECTORY_SEPARATOR . $message->uuid;
896
                            if (!file_exists($target_path)) {
896
                            if (!file_exists($target_path)) {
897
                                mkdir($target_path, 0755, true);
897
                                mkdir($target_path, 0755);
898
                            }
898
                            }
Línea 899... Línea 899...
899
 
899
 
Línea 900... Línea 900...
900
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;
900
                            $full_filename = $target_path  . DIRECTORY_SEPARATOR . $message_filename;