public static function fileToUploadArray($file, $filename = null) {
		$File = new File($file);
		if (empty($fileName)) {
			$filename = basename($file);
		}

		return [
			'name' => $filename,
			'tmp_name' => $file,
			'error' => 0,
			'type' => $File->mime(),
			'size' => $File->size()
		];
	}
public static function fileToUploadArray($file, $filename = null) {
		$File = new File($file);
		if (empty($fileName)) {
			$filename = basename($file);
		}

		return [
			'name' => $filename,
			'tmp_name' => $file,
			'error' => 0,
			'type' => $File->mime(),
			'size' => $File->size()
		];
	}
public static function fileToUploadArray ( $ file , $ filename = null ) { $ File = new File ( $ file ) ; if ( empty ( $ fileName ) ) { $ filename = basename ( $ file ) ; } return [ 'name' => $ filename , 'tmp_name' => $ file , 'error' => 0 , 'type' => $ File -> mime ( ) , 'size' => $ File -> size ( ) ] ; }
Returns an array that matches the structure of a regular upload for a local file

@param string $file The file you want to get an upload array for.
@param string|null Name of the file to use in the upload array.
@return array Array that matches the structure of a regular upload
Returns an array that matches the structure of a regular upload for a local file