use TorrentFile from Rhilip\Bencode

This commit is contained in:
NekoCH
2026-01-09 13:10:51 +08:00
parent 0a568c0d19
commit 4035f4084f
5 changed files with 286 additions and 337 deletions

View File

@@ -6615,4 +6615,9 @@ function hide_text($text) {
return '<span class="hidden-text">' . $text . '</span>';
}
function make_content_disposition(string $filename, string $disposition = 'attachment'): string {
$filenameFallback = str_replace('%', '', Str::ascii($filename));
return \Symfony\Component\HttpFoundation\HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback);
}
?>