Question
Thryve Digital Health LLP
IN
Last activity: 10 Feb 2020 0:37 EST
can't upload with file upload."" is not a file.
I am getting below error when i am uploading files of size more than 10 MB using FilePath Control.
can't upload with file upload."" is not a file.
This issue is coming when i am executing the Java Step in the activity which gets called on uploading the file.
try { String hiddenFilePath = tools.getParamValue("hiddenFilePath"); java.util.HashMap hmFileInfo = pega_rules_utilities.uploadFile(true); String strFileData = (String)hmFileInfo.get("FileData"); String strFileName = (String)hmFileInfo.get("FilePath"); ClipboardPage cpFAttach = tools.findPage("pyMultipleFilesPage.pyFileAttachment(<last>)", true); //save the encoded file to the database cpFAttach.putString("pyLabel", hiddenFilePath); cpFAttach.putString("pyAttachStream", strFileData); //set the file name as well cpFAttach.putString("pxAttachName", strFileName); oLog.info("Attached file ****** " + strFileName); } catch (PRRuntimeException pre) { tools.getThread().getThreadPage().putString("pyXMLStream", pre.toString()); pega.terminateActivity(); }
I am able to upload files less than 10 MB size without any issue. There is no such issue while going through the above step.
I am getting below error when i am uploading files of size more than 10 MB using FilePath Control.
can't upload with file upload."" is not a file.
This issue is coming when i am executing the Java Step in the activity which gets called on uploading the file.
try { String hiddenFilePath = tools.getParamValue("hiddenFilePath"); java.util.HashMap hmFileInfo = pega_rules_utilities.uploadFile(true); String strFileData = (String)hmFileInfo.get("FileData"); String strFileName = (String)hmFileInfo.get("FilePath"); ClipboardPage cpFAttach = tools.findPage("pyMultipleFilesPage.pyFileAttachment(<last>)", true); //save the encoded file to the database cpFAttach.putString("pyLabel", hiddenFilePath); cpFAttach.putString("pyAttachStream", strFileData); //set the file name as well cpFAttach.putString("pxAttachName", strFileName); oLog.info("Attached file ****** " + strFileName); } catch (PRRuntimeException pre) { tools.getThread().getThreadPage().putString("pyXMLStream", pre.toString()); pega.terminateActivity(); }
I am able to upload files less than 10 MB size without any issue. There is no such issue while going through the above step.
Please let me know how to upload files with size more than 10 MB using FilePath control.
***Moderator Edit-Vidyaranjan: Updated Platform Capability***