Add file upload
This commit is contained in:
parent
93f6b38748
commit
ff0bc7c184
@ -134,8 +134,10 @@ function parseIncomingFiles(): array
|
|||||||
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 ($type == "image") {
|
if ($type == "image") {
|
||||||
|
echo "Adding " . $incomingFile["name"];
|
||||||
$imgFname = pathinfo($incomingFile["name"], PATHINFO_FILENAME);
|
$imgFname = pathinfo($incomingFile["name"], PATHINFO_FILENAME);
|
||||||
$uploadPath = getUploadPath("image", $imgFname);
|
$uploadPath = getUploadPath("image", $imgFname);
|
||||||
|
echo "uppa " . $uploadPath;
|
||||||
if (!empty($uploadPath)) {
|
if (!empty($uploadPath)) {
|
||||||
if (!doImageUpload($incomingFile["tmp_name"], $uploadPath)) {
|
if (!doImageUpload($incomingFile["tmp_name"], $uploadPath)) {
|
||||||
$success = false;
|
$success = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user