Skip to content

Commit

Permalink
fix(app-service): fix uuid gen error;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Oct 6, 2021
1 parent e7d44c1 commit d7ecd76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/app-service/src/router/function/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* @Author: Maslow<wangfugen@126.com>
* @Date: 2021-07-30 10:30:29
* @LastEditTime: 2021-09-13 20:16:56
* @LastEditTime: 2021-10-07 01:41:39
* @Description:
*/

import { Router } from 'express'
import { CloudFunction } from 'cloud-function-engine'
import * as multer from 'multer'
import * as path from 'path'
import * as uuid from 'uuid'
import { handleDebugFunction } from './debug'
import { handleInvokeFunction } from './invoke'
import { generateUUID } from '../../lib/utils/rand'

/**
* Custom require function in cloud function
Expand All @@ -35,7 +35,7 @@ const uploader = multer({
storage: multer.diskStorage({
filename: (_req, file, cb) => {
const { ext } = path.parse(file.originalname)
cb(null, uuid.v4() + ext)
cb(null, generateUUID() + ext)
}
})
})
Expand Down

0 comments on commit d7ecd76

Please sign in to comment.