mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Minor changes, added example classes test
This commit is contained in:
parent
8801bb96cd
commit
d8b0c28471
4 changed files with 35 additions and 10 deletions
|
@ -12,7 +12,6 @@ function setup(data: SubmoduleData): void {
|
|||
const publicDir = publicdirs[0]
|
||||
|
||||
const userFilesDir = publicDir + 'userFiles'
|
||||
|
||||
if (!utils.FileExists(userFilesDir)) {
|
||||
utils.CreatePath(userFilesDir, true)
|
||||
}
|
||||
|
@ -20,6 +19,10 @@ function setup(data: SubmoduleData): void {
|
|||
app.get('/listUserDir', (req: Request, res) => {
|
||||
logger.LogReq(req)
|
||||
|
||||
if (!utils.FileExists(userFilesDir)) {
|
||||
utils.CreatePath(userFilesDir, true)
|
||||
}
|
||||
|
||||
const subdir: any = req.query.subdir
|
||||
|
||||
if (subdir) {
|
||||
|
@ -168,7 +171,7 @@ function setup(data: SubmoduleData): void {
|
|||
}
|
||||
|
||||
utils
|
||||
.uploadFile(req, userFilesDir + '/' + safeDir)
|
||||
.uploadFile(req, userFilesDir + '/' + safeDir, true)
|
||||
.then((body) => {
|
||||
logger.Log(
|
||||
`Successfull upload ${body.filePath}`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue