How to limit file size

Hello.. I want to limit the size of the files you can attach to Nuxeo Documents.At the documentation i saw a way by modificating nuxeo.conf.I set the max size this way:

nuxeo.jsf.maxFileSize=555557

This way you can not upload files bigger than the specified size but the platform stucks and doesnt give you a message.Is there a way of showing a message?

0 votes

0 answers

867 views

ANSWER

Hello,

I have couple questions:

  • Did you finish at the end the upload? Would you like to give a message for saying its failing or a loading status?
  • If it's stuck and fail, can you provide the logs you have ? (location: NUXEO_HOME/logs/server.log)

Thank you!

10/18/2017

Hi Vladimir..I doesnt finish at the end of upload.I would like to give a message saying that the file can not be imported because it is too big.It stucks and it doesnt provide any logs.
10/20/2017

You would have to create a custom seam validator to check the size of the blob programmatically and display the good message -> https://doc.nuxeo.com/nxdoc/how-to-add-field-validation/
10/20/2017

Yes but in the creation layout when defining the file:content property you dont have a validator property where you can write the EL expression
10/20/2017

IMO You can add in a custom property down the field configuration panel: validator -> #{yourBean.validate}
10/20/2017

thank you Vladimir.it works
10/21/2017

Do you have any idea if i can limit also when drag and dropping the file Vladimir?
11/07/2017