1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-16 00:06:11 +00:00

fix export sdoc bug (#6773)

This commit is contained in:
JoinTyang 2024-09-13 18:04:39 +08:00 committed by GitHub
parent 8ff9475196
commit 3dae590dfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: