fix upload to folder if images placed on server

This commit is contained in:
themohooks 2024-10-06 01:39:36 +03:00
parent e03c19d006
commit ecd1b0f286
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View file

@ -12,3 +12,4 @@ ngallery.yaml
views/pages/t.php
rules.txt
rules.txt
/uploads/*

View file

@ -63,7 +63,7 @@ class Upload
}
else
{
@mkdir ("{$_SERVER['DOCUMENT_ROOT']}/uploads/{$location}");
mkdir("{$_SERVER['DOCUMENT_ROOT']}/uploads/{$location}", 0777, true);
move_uploaded_file ($tmpname, "{$_SERVER['DOCUMENT_ROOT']}/uploads/{$folder}");
$this->type = $type;