I am getting the below error message when I tried to upload zero size document.Though I am validating size of the file, getting the below error message:An Error Has OccurredCould not upload “zero size”. Reason: This file is emptyHow can I remove this error message?sample code :load( local!FileSize:0, local!fileName,a!formLayout( label: "Upload Document Sample", firstColumnContents: { a!fileUploadField( label: "File Upload", labelPosition: "ABOVE", instructions: "", target:"Temporary Documents", value: fileName, saveInto: { fileName, a!save(local!FileSize,a!fileUploadField(value:fileName).uploadedDocumentSize) }, validations: { if(FileSize<=0,"Error, file size",null ) } ), }, secondColumnContents: { /* Add components here for a two-column form */ }, buttons: a!buttonLayout( primaryB...
OriginalPostID-224673
Discussion posts and replies are publicly visible
Hi,
I tried uploading empty document to the KC, it is accepting that document not giving any error.
Just showing size is < 1KB.
Hi Shweta,
You might be just navigating interface to upload empty file.. it shows that it is less than <0 kb and show attach file where as the minute you try to submit it will pop up with error message and doesn't allow to upload it. You might get error something like below As already shared by most of us.
Appian has kept the constrains to upload empty or zero size file. For me it make sense to have it in place. I would be more interested to understand the business case why do you need to upload the zero kb file. if the requirement is to generate the document, you could simply achieve by having template and generate the file on runtime.