ICEmobile
  1. ICEmobile
  2. MOBI-570

DeviceCoreRenderer accept type interferes with desktop uploads

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Beta
    • Fix Version/s: 1.2 Final
    • Component/s: Faces, Spring
    • Labels:
      None
    • Environment:
      ICEmobile

      Description

      DeviceCoreRenderer sets the accept type which provides features on mobile devices but interferes with desktop uploads. The following code should be disabled for desktop browsers:


                  if (comptype.equals("camera")){
                      writer.writeAttribute("accept", "image/*");
                  }
                  if (comptype.equals("camcorder")){
                      writer.writeAttribute("accept", "video/*");
                  }
                  if (comptype.equals("microphone")){
                      writer.writeAttribute("accept", "audio/*");
                  }

        Activity

        Hide
        Judy Guglielmin added a comment -

        when I tested this, this worked well, as a filter to eliminating possible files that were of incorrect type to upload. Which browser are you referring to? I tested on desktop Chrome, Safari, Firefox and IE9 when I implemented this. Something may have changed since then, so would rather document that, otherwise, user will be able to attempt to upload any filetype (rather than the file chooser filtering out some) and the server will complain on the decode of these components.

        Show
        Judy Guglielmin added a comment - when I tested this, this worked well, as a filter to eliminating possible files that were of incorrect type to upload. Which browser are you referring to? I tested on desktop Chrome, Safari, Firefox and IE9 when I implemented this. Something may have changed since then, so would rather document that, otherwise, user will be able to attempt to upload any filetype (rather than the file chooser filtering out some) and the server will complain on the decode of these components.
        Hide
        Ted Goddard added a comment -

        When I tested on Safari, all files were blocked from upload with the camcorder, including .mp4 files. Having the server complain is much less of a problem than preventing the user from uploading legitimate files. I will retest.

        Show
        Ted Goddard added a comment - When I tested on Safari, all files were blocked from upload with the camcorder, including .mp4 files. Having the server complain is much less of a problem than preventing the user from uploading legitimate files. I will retest.
        Hide
        Ted Goddard added a comment -

        Safari allows upload of .mov files only.
        Chrome allows uploads of .mp4 and .m4v files but not .mov files.
        IE 10 allows uploads of .mov and .mp4 but not .m4v.

        So, the browser detection of possible camcorder uploads is too restrictive.

        Detection of image formats appeared to work, so the component should be modified to include only:

        if (comptype.equals("camera"))

        { writer.writeAttribute("accept", "image/*"); }

        and not attempt to detect video or audio formats.

        Show
        Ted Goddard added a comment - Safari allows upload of .mov files only. Chrome allows uploads of .mp4 and .m4v files but not .mov files. IE 10 allows uploads of .mov and .mp4 but not .m4v. So, the browser detection of possible camcorder uploads is too restrictive. Detection of image formats appeared to work, so the component should be modified to include only: if (comptype.equals("camera")) { writer.writeAttribute("accept", "image/*"); } and not attempt to detect video or audio formats.

          People

          • Assignee:
            Judy Guglielmin
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: