made change to allow all file types for uploads
This commit is contained in:
		@ -289,7 +289,8 @@ class File extends Controller
 | 
				
			|||||||
						$_FILES['file_name']['type'] = 
 | 
											$_FILES['file_name']['type'] = 
 | 
				
			||||||
							str_replace('\\', '', $_FILES['file_name']['type']);
 | 
												str_replace('\\', '', $_FILES['file_name']['type']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						$config['allowed_types'] = $ext;
 | 
											//$config['allowed_types'] = $ext;
 | 
				
			||||||
 | 
											$config['allowed_types'] = '*';
 | 
				
			||||||
						$config['upload_path'] = CODEPOT_FILE_DIR;
 | 
											$config['upload_path'] = CODEPOT_FILE_DIR;
 | 
				
			||||||
						$config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE;
 | 
											$config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE;
 | 
				
			||||||
						$config['encrypt_name'] = TRUE;
 | 
											$config['encrypt_name'] = TRUE;
 | 
				
			||||||
 | 
				
			|||||||
@ -643,7 +643,8 @@ class Wiki extends Controller
 | 
				
			|||||||
				$_FILES[$field_name]['type'] =
 | 
									$_FILES[$field_name]['type'] =
 | 
				
			||||||
					str_replace('\\', '', $_FILES[$field_name]['type']);
 | 
										str_replace('\\', '', $_FILES[$field_name]['type']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				$config['allowed_types'] = $ext;
 | 
									//$config['allowed_types'] = $ext;
 | 
				
			||||||
 | 
									$config['allowed_types'] = '*';
 | 
				
			||||||
				$config['upload_path'] = CODEPOT_ATTACHMENT_DIR;
 | 
									$config['upload_path'] = CODEPOT_ATTACHMENT_DIR;
 | 
				
			||||||
				$config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE;
 | 
									$config['max_size'] = CODEPOT_MAX_UPLOAD_SIZE;
 | 
				
			||||||
				$config['encrypt_name'] = TRUE;
 | 
									$config['encrypt_name'] = TRUE;
 | 
				
			||||||
 | 
				
			|||||||
@ -579,6 +579,11 @@ class CI_Upload {
 | 
				
			|||||||
			return FALSE;
 | 
								return FALSE;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if($this->allowed_types[0] == '*')
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								return true;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		$ext = strtolower(ltrim($this->file_ext, '.'));
 | 
							$ext = strtolower(ltrim($this->file_ext, '.'));
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		if ( ! in_array($ext, $this->allowed_types))
 | 
							if ( ! in_array($ext, $this->allowed_types))
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user