Can't find method com.servoy.extensions.plugins.file.WebFile
Posted: Sun Aug 21, 2022 1:02 pm
Hi all,
I'm grabbing an attachment from Outlook in NG-client 2021.12.
Then I save this to disk before posting the attachment to cloud storage using the HTTP plugin.
When deploying to a Tomcat server, and running Servoy as an Outlook Add-In (this is done in an iFrame), writing to the file fails and I get the following message:
Can't find method com.servoy.extensions.plugins.file.WebFileProvider.js_writeFile(com.servoy.extensions.plugins.file.JSFile,string)
Maybe Servoy is trying to save the file on the client computer rather than on the server.
Any idea of how to get around this?
I'm grabbing an attachment from Outlook in NG-client 2021.12.
Then I save this to disk before posting the attachment to cloud storage using the HTTP plugin.
When deploying to a Tomcat server, and running Servoy as an Outlook Add-In (this is done in an iFrame), writing to the file fails and I get the following message:
Can't find method com.servoy.extensions.plugins.file.WebFileProvider.js_writeFile(com.servoy.extensions.plugins.file.JSFile,string)
- Code: Select all
/**
* @properties={typeid:24,uuid:"94BC16CB-F770-4CD8-890B-0F96D5F1B156"}
* @param {String} upload_filename
* @param {Array<byte>} uploaded_data
* @return {String}
*/
function write_file(upload_filename, uploaded_data) {
var root = upload_filename;
var extension = '.' + root.split('.').pop();
var file = plugins.file.createTempFile(root, extension);
if (plugins.file.writeFile(file, uploaded_data)) {
return file.getAbsolutePath();
} else {
return null;
}
}
Maybe Servoy is trying to save the file on the client computer rather than on the server.
Any idea of how to get around this?