Skip to content

Commit 0e54f7c

Browse files
committed
fix file name
1 parent c5f3c70 commit 0e54f7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ app.post('/api/files', function (req, res) {
235235
// upload to COS
236236
await cos.upload({
237237
Bucket: COS_BUCKET_NAME,
238-
Key: `${fileDetails.userId}/${fileDetails.id}/${fileDetails.originalFilename}`,
238+
Key: `${fileDetails.userId}/${fileDetails.id}/${fileDetails.name}`,
239239
Body: fs.createReadStream(file.filepath),
240240
ContentType: fileDetails.type,
241241
}).promise()

0 commit comments

Comments
 (0)