Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lambda-merge-audio
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aws-lambda
lambda-merge-audio
Commits
259a69b0
Commit
259a69b0
authored
Feb 27, 2023
by
lijiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 在aws 环境中文件夹路径
parent
efd6b78f
Pipeline
#37105
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
utils.js
helper/utils.js
+3
-4
No files found.
helper/utils.js
View file @
259a69b0
...
...
@@ -22,8 +22,7 @@ class Utils {
});
// 保存的文件路径
const
filePath
=
path
.
join
(
__dirname
,
`../download/
${
new
Date
().
getTime
()}
.mp3`
`/tmp/
${
uuid
()}
.mp3`
);
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -70,7 +69,7 @@ class Utils {
};
// 获取需要上传的文件所在路径
const
filePath
=
path
.
join
(
__dirname
,
"../upload
"
,
params
.
key
);
const
filePath
=
path
.
join
(
"/tmp
"
,
params
.
key
);
if
(
!
fs
.
existsSync
(
filePath
))
{
return
reject
({
code
:
412
});
}
...
...
@@ -150,7 +149,7 @@ class Utils {
// 新的音频文件名称
filename
=
`
${
dateDir
}
/
${
uuid
()}
.mp3`
,
// 合并后的音频文件路径
filePath
=
path
.
join
(
__dirname
,
"../upload
"
,
filename
),
filePath
=
path
.
join
(
"/tmp
"
,
filename
),
baseDir
=
path
.
dirname
(
filePath
);
// 如果文件夹不存在,则新创建文件夹
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment