Added uploaded files API controllers and presenters

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-06-27 11:37:31 +01:00
parent 6f45ec655f
commit d8e7123576
19 changed files with 1857 additions and 215 deletions
+13
View File
@@ -48,6 +48,7 @@ class StorageHelper
'avif',
'webp',
'png',
'gif',
];
@@ -59,6 +60,18 @@ class StorageHelper
}
public static function getFiletype($file_with_path) {
// The file exists and is allowed to be displayed inline
if (Storage::exists($file_with_path)) {
return pathinfo($file_with_path, PATHINFO_EXTENSION);
}
return null;
}
/**
* Decide whether to show the file inline or download it.
*/