save download path in database

This commit is contained in:
huangjx
2022-05-12 22:42:41 +08:00
parent cab95529dd
commit 02fb165405
7 changed files with 21 additions and 10 deletions

View File

@@ -192,8 +192,9 @@ class Aria2Controller extends Controller
//internal nextcloud absolute path for nodeExists
//$file = $this->userFolder . $this->downloadDir . "/" . $filename;
// $dir = $this->rootFolder->nodeExists($file) ? $this->downloadDir . "/" . $filename : $this->downloadDir;
$file = $this->downloadDir . "/" . $filename;
$params = ['dir' => $this->downloadDir];
$dlDir = $extra['path'] ?? $this->downloadDir;
$file = $dlDir. "/" . $filename;
$params = ['dir' => $dlDir];
$fileInfo = Filesystem::getFileInfo($file);
if ($fileInfo) {
$fileType = $fileInfo->getType();