API: The media upload (audio, video) is now possible

This commit is contained in:
Michael 2024-07-10 20:23:11 +00:00
parent e3c782010f
commit 7dc75d585e
9 changed files with 151 additions and 41 deletions

View file

@ -106,7 +106,7 @@ class Upload extends \Friendica\BaseModule
$this->return(401, $msg);
}
$newid = Attach::storeFile($tempFileName, $owner['uid'], $fileName, '<' . $owner['id'] . '>');
$newid = Attach::storeFile($tempFileName, $_FILES['userfile']['type'] ?? '', $owner['uid'], $fileName, '<' . $owner['id'] . '>');
@unlink($tempFileName);