0 Replies Latest reply on May 28, 2019 8:56 AM by Priyanka Maheshwari

    How to get filesize in client side with JSF richfaces fileupload

    Priyanka Maheshwari Newbie

      I am using rich fileupload 4.3.2 version. JSF richfaces fileupload first uploads files on server and then throws the error if file size exceeds in size. Size restriction in web.xml is already put but since its global parameter I can not put a smaller number.

      If a user starts uploading file in large size it takes lots of time since upload speed at client side is very slow in KBs (It takes 5-10 mins to upload 25 MB of file).

      I am thinking to validate the filesize before its uploaded on server in javascript. In 3.3 version it was possible using event.memo.entry.size. but it’s not available with 4.3.2 version.

      I want to find a solution to check filesize in client side using rich fileupload (4.3.2) only since its already been used at many places in my application. Changing to entirely new solution or upgrade to 4.5 will not be feasible.

      Please advise.