mirror of
https://github.com/sasjs/server.git
synced 2026-01-11 08:20:04 +00:00
feat(executor): improved api response
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import path from 'path'
|
||||
import { getRealPath } from '@sasjs/utils'
|
||||
import { getRealPath, generateTimestamp } from '@sasjs/utils'
|
||||
|
||||
export const getTmpFolderPath = () =>
|
||||
getRealPath(path.join(__dirname, '..', '..', 'tmp'))
|
||||
@@ -11,3 +11,13 @@ export const getTmpLogFolderPath = () => path.join(getTmpFolderPath(), 'logs')
|
||||
|
||||
export const getTmpWeboutFolderPath = () =>
|
||||
path.join(getTmpFolderPath(), 'webouts')
|
||||
|
||||
export const generateUniqueFileName = (fileName: string, extension = '') =>
|
||||
[
|
||||
fileName,
|
||||
'-',
|
||||
Math.round(Math.random() * 100000),
|
||||
'-',
|
||||
generateTimestamp(),
|
||||
extension
|
||||
].join('')
|
||||
|
||||
Reference in New Issue
Block a user