mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 15:26:19 +00:00
update suffix
This commit is contained in:
@@ -124,7 +124,7 @@ class ImportConfluenceDialog extends React.Component {
|
|||||||
type="file"
|
type="file"
|
||||||
ref={this.fileInputRef}
|
ref={this.fileInputRef}
|
||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
accept=".html.zip"
|
accept=".zip"
|
||||||
onChange={this.handleFileChange}
|
onChange={this.handleFileChange}
|
||||||
/>
|
/>
|
||||||
<Button color="primary" onClick={this.triggerFileInput} disabled={isUploading}>
|
<Button color="primary" onClick={this.triggerFileInput} disabled={isUploading}>
|
||||||
|
@@ -116,13 +116,7 @@ class Wikis extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
importConfluence = (file, currentDeptID) => {
|
importConfluence = async (file, currentDeptID) => {
|
||||||
if (!file) return;
|
|
||||||
if (!file.name.endsWith('.html.zip')) {
|
|
||||||
toaster.danger(gettext('Please select a valid Confluence HTML export file (.html.zip)'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return wikiAPI.importConfluence(file, currentDeptID).then((res) => {
|
return wikiAPI.importConfluence(file, currentDeptID).then((res) => {
|
||||||
let wikis = this.state.wikis.slice(0);
|
let wikis = this.state.wikis.slice(0);
|
||||||
let groupWikis = this.state.groupWikis;
|
let groupWikis = this.state.groupWikis;
|
||||||
|
@@ -1799,14 +1799,7 @@ class ImportConfluenceView(APIView):
|
|||||||
file_id = seafile_api.get_file_id_by_path(repo_id, new_file_path)
|
file_id = seafile_api.get_file_id_by_path(repo_id, new_file_path)
|
||||||
download_token = seafile_api.get_fileserver_access_token(repo_id, file_id, 'download', username)
|
download_token = seafile_api.get_fileserver_access_token(repo_id, file_id, 'download', username)
|
||||||
download_url = gen_file_get_url(download_token, zip_file.name)
|
download_url = gen_file_get_url(download_token, zip_file.name)
|
||||||
upload_token = seafile_api.get_fileserver_access_token(repo_id,
|
return download_url, upload_link
|
||||||
json.dumps({'parent_dir': server_wiki_tmp_dir}),
|
|
||||||
'upload-link',
|
|
||||||
username,
|
|
||||||
use_onetime=False)
|
|
||||||
|
|
||||||
upload_url = gen_file_upload_url(upload_token, 'upload-api')
|
|
||||||
return download_url, upload_url
|
|
||||||
|
|
||||||
|
|
||||||
def _extract_html_zip(self, zip_file, space_key):
|
def _extract_html_zip(self, zip_file, space_key):
|
||||||
|
Reference in New Issue
Block a user