forked from Adleraci/adlerka.top
Add file upload
This commit is contained in:
parent
8c471ca067
commit
c73d471fab
@ -133,7 +133,7 @@ function parseIncomingFiles(): array
|
|||||||
foreach ($incomingFiles as $incomingFile) {
|
foreach ($incomingFiles as $incomingFile) {
|
||||||
if ($incomingFile["error"] == 0 && is_file($incomingFile["tmp_name"])) {
|
if ($incomingFile["error"] == 0 && is_file($incomingFile["tmp_name"])) {
|
||||||
$type = explode("/", $incomingFile["type"]);
|
$type = explode("/", $incomingFile["type"]);
|
||||||
if (str_starts_with($type, "image")) {
|
if ($type[0] == "image") {
|
||||||
echo "Adding " . $incomingFile["name"];
|
echo "Adding " . $incomingFile["name"];
|
||||||
$imgFname = pathinfo($incomingFile["name"], PATHINFO_FILENAME);
|
$imgFname = pathinfo($incomingFile["name"], PATHINFO_FILENAME);
|
||||||
$uploadPath = getUploadPath("image", $imgFname);
|
$uploadPath = getUploadPath("image", $imgFname);
|
||||||
|
Loading…
Reference in New Issue
Block a user