I have a very strange issue with the file plugin in Servoy 6.1 Webclient.
I try to upload a file using the showFileOpenDialog() method of the file plugin but I get a error.
an't find method com.servoy.extensions.plugins.file.FileProvider.js_showFileOpenDialog(number,null,null,null,function,null). (/Users/rick/servoy_workspace_61/Sol/forms/upload_file_dlg.js#34)
Can't find method com.servoy.extensions.plugins.file.FileProvider.js_showFileOpenDialog(number,null,null,null,function,null). (/Users/rick/servoy_workspace_61/Sol/forms/upload_file_dlg.js#34)
at /Users/rick/servoy_workspace_61/Sol/forms/upload_file_dlg.js:34 (BTN_selectFile)
This is the code I have
/**
* Perform the element default action.
*
* @param {JSEvent} event the event that triggered the action
*
* @properties={typeid:24,uuid:"5036D272-3944-4EF3-96C0-9C2FABE7C831"}
*/
function BTN_selectFile(event) {
//for the web you have to give a callback function that has a JSFile array as its first argument (also works in smart), only multi select and the title are used in the webclient, others are ignored
/** @type {JSFile[]} */
plugins.file.showFileOpenDialog(1, null, null, null, fileCallBack, null);
}
The callback:
/**
* // TODO generated, please specify type and doc for the params
* @param {Object} vData
*
* @properties={typeid:24,uuid:"76B4172D-E398-4B8F-9D36-92AE13DD771D"}
*/
function fileCallBack(vData) {
file_blob = vData[0];
file_name = vData[0].getName();
}
Is it something I do wrong because of some changes? Or is this a bug?