fix: title should not affact original file
This commit is contained in:
parent
d635ffbc66
commit
88fec3b8f2
1 changed files with 8 additions and 2 deletions
|
|
@ -210,9 +210,15 @@ export class FileController extends Controller {
|
|||
copy++;
|
||||
}
|
||||
|
||||
copyFileName = `${originalName} (${copy})` + extension;
|
||||
copyFileName = `${originalName} (${copy + 1})` + extension;
|
||||
|
||||
const result = await updateFile(path, fileName, Object.assign(props, { title: copyFileName}), path, copyFileName);
|
||||
const result = await updateFile(
|
||||
path,
|
||||
fileName,
|
||||
{ ...props, title: copyFileName },
|
||||
path,
|
||||
copyFileName,
|
||||
);
|
||||
|
||||
if (!result) {
|
||||
throw new Error("เกิดข้อผิดพลาดกับระบบจัดการไฟล์ ไม่สามารถแก้ไขไฟล์ได้");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue