File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ def flat_map(array: List[List]):
327327
328328
329329def parse_image (content : str ):
330- matches = re .finditer ("!\[.*?\]\(\/oss\/(image|file)\/.*?\)" , content )
330+ matches = re .finditer ("!\[.*?\]\(\.\ /oss\/(image|file)\/.*?\)" , content )
331331 image_list = [match .group () for match in matches ]
332332 return image_list
333333
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ def write_image(zip_path: str, image_list: List[str]):
177177 file = QuerySet (File ).filter (id = r ).first ()
178178 if file is None :
179179 break
180- zip_inner_path = os .path .join ('api ' , 'file' , r )
180+ zip_inner_path = os .path .join ('oss ' , 'file' , r )
181181 file_path = os .path .join (zip_path , zip_inner_path )
182182 if not os .path .exists (os .path .dirname (file_path )):
183183 os .makedirs (os .path .dirname (file_path ))
Original file line number Diff line number Diff line change @@ -590,10 +590,10 @@ def export_zip(self, with_valid=True):
590590
591591 workbook = DocumentSerializers .Operate .get_workbook (data_dict , document_dict )
592592 response = HttpResponse (content_type = 'application/zip' )
593- response ['Content-Disposition' ] = 'attachment; filename="archive .zip"'
593+ response ['Content-Disposition' ] = f 'attachment; filename="{ document . name } .zip"'
594594 zip_buffer = io .BytesIO ()
595595 with TemporaryDirectory () as tempdir :
596- knowledge_file = os .path .join (tempdir , 'knowledge .xlsx' )
596+ knowledge_file = os .path .join (tempdir , 'document .xlsx' )
597597 workbook .save (knowledge_file )
598598 for r in res :
599599 write_image (tempdir , r )
You can’t perform that action at this time.
0 commit comments