[ATTACHMENTS] Even more further refactoring

Introduce Encoder plugins Instead of abstract upload and thumb modules

Ported attachment routes. In v3 thumbnail depends on existing attachment
so route updated accordingly.
This commit is contained in:
2021-04-18 05:47:16 +01:00
committed by Hugo Sales
parent 0eaccc32fe
commit e385a9ac29
25 changed files with 113 additions and 2236 deletions

View File

@@ -27,9 +27,23 @@ use Symfony\Component\HttpFoundation\Request;
class Attachment extends Controller
{
public function attachment_inline(Request $request, int $id)
public function attachment_show(Request $request, int $id)
{
}
public function attachment_view(Request $request, int $id)
{
$res = M::getAttachmentFileInfo($id);
return M::sendFile($res['file_path'], $res['mimetype'], $res['title']);
return M::sendFile($res['file_path'], $res['mimetype'], $res['title'], 'inline');
}
public function attachment_download(Request $request, int $id)
{
$res = M::getAttachmentFileInfo($id);
return M::sendFile($res['file_path'], $res['mimetype'], $res['title'], 'attachment');
}
public function attachment_thumbnail(Request $request, int $id)
{
}
}