|
|
@ -92,11 +92,12 @@ router.get('/direct/:fakeId', async (req, res) => {
|
|
|
|
// Get the ID
|
|
|
|
// Get the ID
|
|
|
|
const fakeId = req.params.fakeId;
|
|
|
|
const fakeId = req.params.fakeId;
|
|
|
|
|
|
|
|
|
|
|
|
if (!files.has(fakeId)) return res.status(404).send();
|
|
|
|
// Get the file metadata
|
|
|
|
else {
|
|
|
|
const _data = await data.get('files', fakeId);
|
|
|
|
|
|
|
|
|
|
|
|
// Get file metadata
|
|
|
|
if (!_data) return res.status(404).send();
|
|
|
|
const meta = files.get(fakeId)!;
|
|
|
|
else {
|
|
|
|
|
|
|
|
const meta = _data as AssFile;
|
|
|
|
|
|
|
|
|
|
|
|
// File data can come from either S3 or local filesystem
|
|
|
|
// File data can come from either S3 or local filesystem
|
|
|
|
let output: Readable | NodeJS.ReadableStream;
|
|
|
|
let output: Readable | NodeJS.ReadableStream;
|
|
|
|