1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 04:48:03 +00:00

fix bug when save text file (#5766)

This commit is contained in:
lian
2023-11-16 16:53:19 +08:00
committed by GitHub
parent 9276c5380c
commit 79448fe0f9

View File

@@ -7,6 +7,7 @@ import FileView from './components/file-view/file-view';
import SeafileCodeMirror from './components/seafile-codemirror';
import FileViewTip from './components/file-view/file-view-tip';
import { seafileAPI } from './utils/seafile-api';
import { Utils } from './utils/utils';
import './css/text-file-view.css';
const {
@@ -64,7 +65,7 @@ class ViewFileText extends React.Component {
if (!this.isParticipant) {
this.addParticipant();
}
let dirPath = '/';
let dirPath = Utils.getDirName(filePath);
return (
seafileAPI.getUpdateLink(repoID, dirPath).then((res) => {
const uploadLink = res.data;