If you have stored your document in a blob, then you need to write it to disk first. See the file plugin methods. The file plugin allows you to create a temp file. That file’s path can be used then…
irenem:
I’ve tried the writeFile plugin, but I’m having some problems.
var filePath = 'MyHardisk/MyFolder/test.doc'
var success = plugins.file.writeFile(filePath,forms.action_list.act_document);
if (success)
{ plugins.dialogs.showInfoDialog(‘Export’, ‘File OK’, ‘OK’);
}
I get no warnings, the dialog says "File OK" but I can't find any file in MyFolder.
What am I doing wrong?
I think, the file hasn’t been created yet. First create the File then write into that.
var filePath = 'MyHardisk/MyFolder/test.doc'
var file = plugins.file.createFile(filePath);
var success = plugins.file.writeFile(file,forms.action_list.act_document);
if (success)
{ plugins.dialogs.showInfoDialog('Export', 'File OK', 'OK');
}
Your path looks strange. What system are you on? On windows, it should look something like C:.…, and on the Mac I think it should be /Volumes/myHardDisk/…