public function _getFileInfoFromUpload(&$upload, $field = 'file') {
		if (!empty($upload[$field]['tmp_name'])) {
			$File = new File($upload[$field]['tmp_name']);
			$upload['filesize'] = filesize($upload[$field]['tmp_name']);
			$upload['mime_type'] = $File->mime();
		}

		if (!empty($upload[$field]['name'])) {
			$upload['extension'] = pathinfo($upload[$field]['name'], PATHINFO_EXTENSION);
			$upload['filename'] = $upload[$field]['name'];
		}
	}
public function _getFileInfoFromUpload(&$upload, $field = 'file') {
		if (!empty($upload[$field]['tmp_name'])) {
			$File = new File($upload[$field]['tmp_name']);
			$upload['filesize'] = filesize($upload[$field]['tmp_name']);
			$upload['mime_type'] = $File->mime();
		}

		if (!empty($upload[$field]['name'])) {
			$upload['extension'] = pathinfo($upload[$field]['name'], PATHINFO_EXTENSION);
			$upload['filename'] = $upload[$field]['name'];
		}
	}
public function _getFileInfoFromUpload ( & $ upload , $ field = 'file' ) { if ( ! empty ( $ upload [ $ field ] [ 'tmp_name' ] ) ) { $ File = new File ( $ upload [ $ field ] [ 'tmp_name' ] ) ; $ upload [ 'filesize' ] = filesize ( $ upload [ $ field ] [ 'tmp_name' ] ) ; $ upload [ 'mime_type' ] = $ File -> mime ( ) ; } if ( ! empty ( $ upload [ $ field ] [ 'name' ] ) ) { $ upload [ 'extension' ] = pathinfo ( $ upload [ $ field ] [ 'name' ] , PATHINFO_EXTENSION ) ; $ upload [ 'filename' ] = $ upload [ $ field ] [ 'name' ] ; } }
Gets information about the file that is being uploaded.

- gets the file size
- gets the mime type
- gets the extension if present

@param array|\ArrayAccess $upload
@param string $field
@return void
Gets information about the file that is being uploaded .