mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-04-11 02:09:03 +02:00
fix bugs
- pass document root for cron job - fix upload dir path
This commit is contained in:
parent
b3c2f72146
commit
6b4012b7a3
@ -55,13 +55,14 @@ const App = {
|
||||
App.Elements.PageView.style.display = "none";
|
||||
new DropzoneManager(App.Elements.Dropzone);
|
||||
|
||||
let stats = await Api.GetSiteInfo();
|
||||
if(stats.ok){
|
||||
let elms = document.querySelectorAll("#footer-stats div span");
|
||||
elms[0].textContent = stats.data.basic_stats.Files;
|
||||
elms[1].textContent = Utils.FormatBytes(stats.data.basic_stats.Size, 2);
|
||||
elms[2].textContent = Utils.FormatBytes(stats.data.basic_stats.Transfer_24h, 2);
|
||||
}
|
||||
}
|
||||
|
||||
let stats = await Api.GetSiteInfo();
|
||||
if(stats.ok){
|
||||
let elms = document.querySelectorAll("#footer-stats div span");
|
||||
elms[0].textContent = stats.data.basic_stats.Files;
|
||||
elms[1].textContent = Utils.FormatBytes(stats.data.basic_stats.Size, 2);
|
||||
elms[2].textContent = Utils.FormatBytes(stats.data.basic_stats.Transfer_24h, 2);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,8 +3,9 @@
|
||||
|
||||
StaticRedis::Connect();
|
||||
Config::LoadConfig(array("upload_folder"));
|
||||
|
||||
$fs = new FileStore(Config::$Instance->upload_folder, "/usr/local/nginx/html");
|
||||
var_dump($_SERVER);
|
||||
|
||||
$fs = new FileStore(Config::$Instance->upload_folder, $_SERVER["cron_root"]);
|
||||
|
||||
echo "Loading stats for: " . $fs->GetUploadDirAbsolute() . "\n";
|
||||
//echo "\n\t" . implode("\n\t", $fs->ListFiles()) . "\n";
|
||||
|
@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
public function GetAbsoluteFilePath($id) : string {
|
||||
return "$this->GetUploadDirAbsolute()/$this->UploadFolder/$id";
|
||||
return $this->GetUploadDirAbsolute() . "/" . $id;
|
||||
}
|
||||
|
||||
public function GetFileInfo($id) : ?FileInfo {
|
||||
|
Loading…
x
Reference in New Issue
Block a user