1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-17 00:32:37 +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 import requests
from zipfile import ZipFile, is_zipfile 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.tags.models import FileUUIDMap
from seahub.settings import SEADOC_PRIVATE_KEY from seahub.settings import SEADOC_PRIVATE_KEY
@ -351,6 +351,7 @@ def export_sdoc_prepare_images_folder(repo_id, doc_uuid, images_dir_id, username
except Exception as e: except Exception as e:
raise e raise e
if not USE_GO_FILESERVER:
progress = {'zipped': 0, 'total': 1} progress = {'zipped': 0, 'total': 1}
while progress['zipped'] != progress['total']: while progress['zipped'] != progress['total']:
time.sleep(0.5) # sleep 0.5 second time.sleep(0.5) # sleep 0.5 second