ICEfaces
  1. ICEfaces
  2. ICE-1802

Input File usability improvements

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      any

      Description

       Here is what I'd like to see as far as capabilities:

      1. If a user uploads a file that's beyond my configured max size, I want to immediately bail out with an error messages displaying that the file exceeds maximum allowed size.
      - This is possible because we know the content size of the upload and we know the max configured size. It would be easy to post an error message right at the beginning of the upload servlet.
      2. If the content type doesn't match what I allow (via an accept attribute on the inputFile component), immediately let the user know that something is wrong with their upload via an error message.
      3. If I want, for any reason, to stop uploading data, I should be able to throw an exception or callback into the process somehow to tell the upload to stop and have an error message of my choosing displayed to the user.

      This only makes sense. If I detect something wrong with the upload, a virus or some other crazy stuff going on in the stream, I need the ability to say, "hey, stop immediately, something is wrong" and tell the user what's going on. Right now, I can throw an exception but that just bails out on the service call to UploadServlet...it doesn't tell the user anything. It's just no response at all. In addition, I have to code up all the error handling conditions AFTER the data is loaded or reaches my max upload limit size before I can tell the user something was wrong. My site will allow users to upload MP3 files...which can be fairly large. At the end of it, which may take a few minutes to upload, I'm going to display the error? That may upset my users to no end. I'd rather bail out up front.

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          Apparently, there's no way, to stop the browser from trying to upload the file. Not even breaking the socket connection. We might be able to fire off the error events right away, and let the application continue on, but we can not stop the upload.

          Show
          Mark Collette added a comment - Apparently, there's no way, to stop the browser from trying to upload the file. Not even breaking the socket connection. We might be able to fire off the error events right away, and let the application continue on, but we can not stop the upload.
          Hide
          Mark Collette added a comment - - edited

          The new ACE fileEntry component will stop writing the file to the file system if a quota is exceeded. The application may also use it's own FileEntryStatus object to describe what was wrong.

          Show
          Mark Collette added a comment - - edited The new ACE fileEntry component will stop writing the file to the file system if a quota is exceeded. The application may also use it's own FileEntryStatus object to describe what was wrong.

            People

            • Assignee:
              Unassigned
              Reporter:
              Philip Breau
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: