Commit 543f78dd authored by ameoba32's avatar ameoba32

[bp/57457][FIX] File uploaded to Forums DB storage was not downloaded

parent e00df49f
......@@ -40,8 +40,13 @@ header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: Public");
if ($info["dir"]) {
// if database has content, means file was uploaded to DB storage
if (strlen($content) > 0) {
echo "$content";
} else if (file_exists($info["dir"] . $info["path"])) {
// Check if file was uploaded to file syste
readfile($info["dir"] . $info["path"]);
} else {
echo "$content";
// Something is wrong
die('File data was not found');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment