Add size to job listing and upload.
This commit is contained in:
@@ -36,6 +36,7 @@ export async function JobsListMedia(req: Request, res: Response) {
|
||||
|
||||
return {
|
||||
type,
|
||||
size: file.size,
|
||||
src: GenerateUrl([
|
||||
FolderPaths.StaticPath,
|
||||
FolderPaths.JobsFolder,
|
||||
@@ -75,9 +76,10 @@ export async function JobsListMedia(req: Request, res: Response) {
|
||||
const type: core.FileTypeResult | undefined = await ft.fromFile(
|
||||
relativeFilePath
|
||||
);
|
||||
|
||||
const fileSize = await fs.stat(relativeFilePath);
|
||||
return {
|
||||
type,
|
||||
size: fileSize.size,
|
||||
src: GenerateUrl([
|
||||
FolderPaths.StaticPath,
|
||||
FolderPaths.JobsFolder,
|
||||
|
||||
Reference in New Issue
Block a user