mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-16 16:21:48 +00:00
fix export sdoc bug (#6773)
This commit is contained in:
parent
8ff9475196
commit
3dae590dfc
@ -10,7 +10,7 @@ import shutil
|
||||
import requests
|
||||
from zipfile import ZipFile, is_zipfile
|
||||
|
||||
from seaserv import seafile_api
|
||||
from seaserv import seafile_api, USE_GO_FILESERVER
|
||||
|
||||
from seahub.tags.models import FileUUIDMap
|
||||
from seahub.settings import SEADOC_PRIVATE_KEY
|
||||
@ -351,13 +351,14 @@ def export_sdoc_prepare_images_folder(repo_id, doc_uuid, images_dir_id, username
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
progress = {'zipped': 0, 'total': 1}
|
||||
while progress['zipped'] != progress['total']:
|
||||
time.sleep(0.5) # sleep 0.5 second
|
||||
try:
|
||||
progress = json.loads(seafile_api.query_zip_progress(token))
|
||||
except Exception as e:
|
||||
raise e
|
||||
if not USE_GO_FILESERVER:
|
||||
progress = {'zipped': 0, 'total': 1}
|
||||
while progress['zipped'] != progress['total']:
|
||||
time.sleep(0.5) # sleep 0.5 second
|
||||
try:
|
||||
progress = json.loads(seafile_api.query_zip_progress(token))
|
||||
except Exception as e:
|
||||
raise e
|
||||
|
||||
asset_url = '%s/zip/%s' % (get_inner_fileserver_root(), token)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user