use call first and update docs
parent
ec6dc4fa0e
commit
d09e66e271
|
@ -259,7 +259,7 @@ This hook will allow a plug-in developer to modify the file name of an exported
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
exports.exportFileName = function(hook, padId){
|
exports.exportFileName = function(hook, padId, callback){
|
||||||
return "newFileName"+padId;
|
callback("newFileName"+padId);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -49,10 +49,10 @@ exports.doExport = function(req, res, padId, type)
|
||||||
var fileName = padId;
|
var fileName = padId;
|
||||||
|
|
||||||
// allow fileName to be overwritten by a hook, the type type is kept static for security reasons
|
// allow fileName to be overwritten by a hook, the type type is kept static for security reasons
|
||||||
hooks.aCallAll("exportFileName", padId,
|
hooks.aCallFirst("exportFileName", padId,
|
||||||
function(err, hookFileName){
|
function(err, hookFileName){
|
||||||
// if fileName is set then set it to the padId, note that fileName is returned as an array.
|
// if fileName is set then set it to the padId, note that fileName is returned as an array.
|
||||||
if(fileName[0]) fileName = hookFileName;
|
if(hookFileName[0]) fileName = hookFileName[0];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue