feat: ✨ add new Post wrapper and Blog overview page
This commit is contained in:
parent
b420a6eafa
commit
a2c6842b71
8 changed files with 384 additions and 6 deletions
|
@ -118,12 +118,14 @@ class PostHandler extends MySQLAdapter {
|
|||
}
|
||||
|
||||
function handle_upload($post_path, $file_path) {
|
||||
$post_path = $this->_sanitize_path($post_path);
|
||||
$ext = pathinfo($post_path, PATHINFO_EXTENSION);
|
||||
|
||||
switch($ext) {
|
||||
case "md":
|
||||
$this->save_markdown_post($post_path, file_get_contents($file_path));
|
||||
|
||||
$this->make_post_directory(dirname($post_path));
|
||||
move_uploaded_file($file_path, $this->data_directory . $post_path);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue