You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
When I render a pass through the .render(response, callback) method, the callback only gets called when something fails.
I thing the issue is that the "end" event is never emitted when the zip file has been created successfully. I've done some testing, and I've seen that the "end" event on the zip variable is never fired neither.
When I add an zip.emit("end") after adding the signature is added to the zip. Still nothing happens. When i move the zip.on("end", ...) outside of the callback passed to the self.signZip(...) method, my original callback gets called.
here is how I changed the code:
in pass.js:
within the pipe function:
functiondoneWithImages(){if(lastError){zip.close();self.emit("error",lastError);}else{//This was moved upzip.on("end",function(){self.emit("end");});zip.on("error",function(error){self.emit("error",error);});//End of changeself.signZip(zip,manifest,function(error){zip.close();//the above code was taken from here});}}
within the signZip function:
signManifest(this.template,json,function(error,signature){if(!error){zip.addFile("signature").end(signature);//The next line was addedzip.emit("end");}callback(error);});
The text was updated successfully, but these errors were encountered:
When I render a pass through the .render(response, callback) method, the callback only gets called when something fails.
I thing the issue is that the "end" event is never emitted when the zip file has been created successfully. I've done some testing, and I've seen that the "end" event on the zip variable is never fired neither.
When I add an zip.emit("end") after adding the signature is added to the zip. Still nothing happens. When i move the zip.on("end", ...) outside of the callback passed to the self.signZip(...) method, my original callback gets called.
here is how I changed the code:
in pass.js:
within the pipe function:
within the signZip function:
The text was updated successfully, but these errors were encountered: