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

        Ted Goddard created issue -
        Ted Goddard made changes -
        Field Original Value New Value
        Assignee Steve Maryka [ steve.maryka ] Judy Guglielmin [ judy.guglielmin ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32656 Fri Dec 07 11:05:55 MST 2012 judy.guglielmin MOBI-570 removed accept for video and audio if desktop browser detected
        Files Changed
        Commit graph MODIFY /icemobile/trunk/icemobile/core/src/main/java/org/icemobile/renderkit/DeviceCoreRenderer.java
        Judy Guglielmin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: