@@ -78,7 +78,7 @@ def getredirecturl(viewmode, wopisrc, acctok, docid, filename, displayname, reva
7878# Cloud storage to CodiMD
7979##########################
8080
81- def _unzipattachments (inputbuf , wopisrc , acctok ):
81+ def _unzipattachments (inputbuf , docid , wopisrc , acctok ):
8282 '''Unzip the given input buffer uploading the content to CodiMD and return the contained .md file'''
8383 mddoc = None
8484 try :
@@ -108,6 +108,7 @@ def _unzipattachments(inputbuf, wopisrc, acctok):
108108 res = requests .post (appurl + '/uploadimage' ,
109109 params = {'generateFilename' : 'false' ,
110110 'WOPISrc' : wopisrc ,
111+ 'docId' : docid ,
111112 'accessToken' : acctok },
112113 files = {'image' : (fname , inputzip .read (zipinfo ))}, verify = sslverify , timeout = 10 )
113114 if res .status_code != http .client .OK :
@@ -150,7 +151,7 @@ def loadfromstorage(filemd, wopisrc, acctok, docid):
150151
151152 # if it's a bundled file, unzip it and push the attachments in the appropriate folder
152153 if wasbundle and mdfile :
153- mddoc = _unzipattachments (mdfile , wopisrc , acctok )
154+ mddoc = _unzipattachments (mdfile , docid , wopisrc , acctok )
154155 else :
155156 mddoc = mdfile
156157 # if the file was created on Windows, convert \r\n to \n for CodiMD to correctly edit it
0 commit comments