Add file upload
This commit is contained in:
parent
74eef045d8
commit
93f6b38748
@ -164,7 +164,9 @@ function getUploadPath($type = "unknown", $filename = "hehe"): string
|
||||
default => 'dummy',
|
||||
};
|
||||
if ($extension != "dummy") {
|
||||
return "uploads/$type/$id/$date/$filename.$extension";
|
||||
$basepath = "uploads/$type/$id/$date";
|
||||
mkdir($basepath, 755, true);
|
||||
return $basepath . "/$filename.$extension";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user