mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 06:33:48 +00:00
update suffix
This commit is contained in:
@@ -124,7 +124,7 @@ class ImportConfluenceDialog extends React.Component {
|
||||
type="file"
|
||||
ref={this.fileInputRef}
|
||||
style={{ display: 'none' }}
|
||||
accept=".html.zip"
|
||||
accept=".zip"
|
||||
onChange={this.handleFileChange}
|
||||
/>
|
||||
<Button color="primary" onClick={this.triggerFileInput} disabled={isUploading}>
|
||||
|
@@ -116,13 +116,7 @@ class Wikis extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
importConfluence = (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;
|
||||
}
|
||||
|
||||
importConfluence = async (file, currentDeptID) => {
|
||||
return wikiAPI.importConfluence(file, currentDeptID).then((res) => {
|
||||
let wikis = this.state.wikis.slice(0);
|
||||
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)
|
||||
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)
|
||||
upload_token = seafile_api.get_fileserver_access_token(repo_id,
|
||||
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
|
||||
return download_url, upload_link
|
||||
|
||||
|
||||
def _extract_html_zip(self, zip_file, space_key):
|
||||
|
Reference in New Issue
Block a user