mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
[shared file, file in shared dir view] use new api for file 'save as' (#4650)
This commit is contained in:
@@ -8,6 +8,7 @@ import { Utils } from '../../utils/utils';
|
||||
|
||||
const propTypes = {
|
||||
sharedToken: PropTypes.string.isRequired,
|
||||
filePath: PropTypes.string,
|
||||
toggleCancel: PropTypes.func.isRequired,
|
||||
handleSaveSharedFile: PropTypes.func.isRequired,
|
||||
};
|
||||
@@ -24,7 +25,8 @@ class SaveSharedFileDialog extends React.Component {
|
||||
}
|
||||
|
||||
onSaveSharedFile = () => {
|
||||
seafileAPI.saveSharedFile(this.state.repo.repo_id, this.state.selectedPath, this.props.sharedToken).then((res) => {
|
||||
const { sharedToken, filePath } = this.props;
|
||||
seafileAPI.saveSharedFile(this.state.repo.repo_id, this.state.selectedPath, sharedToken, filePath).then((res) => {
|
||||
this.props.toggleCancel();
|
||||
this.props.handleSaveSharedFile();
|
||||
}).catch((error) => {
|
||||
|
Reference in New Issue
Block a user