Could not upload “zero size”. Reason: This file is empty

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 Occurred

Could not upload “zero size”. Reason: This file is empty

How 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

OriginalPostID-224673

  Discussion posts and replies are publicly visible

Parents
  • @bhanuprakashm Just to let you know, afaik, the forum post at the link referred by you at last isn't relevant to the error being discussed by @ramakg here. @ramakg is experiencing an issue in uploading a file that has no contents whereas the post at link referred by you is talking about behavior of 'Save Changes' when the SAIL interface consists of file upload components and I opine that both are different.
Reply
  • @bhanuprakashm Just to let you know, afaik, the forum post at the link referred by you at last isn't relevant to the error being discussed by @ramakg here. @ramakg is experiencing an issue in uploading a file that has no contents whereas the post at link referred by you is talking about behavior of 'Save Changes' when the SAIL interface consists of file upload components and I opine that both are different.
Children
No Data