Merge pull request #2252 from otetard/bugfix/fix_export_filename
If exportFileName hook isn’t defined don’t return empty filename.pull/2254/head
commit
d25d81b9e2
|
@ -52,7 +52,7 @@ exports.doExport = function(req, res, padId, type)
|
||||||
hooks.aCallFirst("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(hookFileName) fileName = hookFileName;
|
if(hookFileName.length) fileName = hookFileName;
|
||||||
|
|
||||||
|
|
||||||
//tell the browser that this is a downloadable file
|
//tell the browser that this is a downloadable file
|
||||||
|
|
Loading…
Reference in New Issue