Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14611] MobileWeb: Reading file contents is not compatible with IE

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-27T21:39:59.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.3.0
ComponentsMobileWeb
Labelsmobileweb, module_network, qe-testadded
ReporterBrenton House
AssigneeChris Barber
Created2013-07-18T21:19:03.000+0000
Updated2014-07-25T22:06:47.000+0000

Description

When doing a file.read(), Titanium SDK executes the following command in local.js:
xhr.overrideMimeType('text/plain; charset=x-user-defined');
overrideMimeType is not supported in Internet Explorer and will break the app. to solve this, simply change the line to this:
if( xhr.overrideMimeType)
{
    xhr.overrideMimeType('text/plain; charset=x-user-defined');
}
I have modified the local copy of my SDK and verified that this does work. Created Pull Request: https://github.com/appcelerator/titanium_mobile/pull/4460

Comments

  1. Brenton House 2014-02-12

    Are there any updates on this issue? How can we get this bug fix pushed into a build? Thanks!!
  2. Chris Barber 2014-03-27

    Test case:
       var url = 'http://httpbin.org/post';
       var client = Ti.Network.createHTTPClient({
           onload : function(e) {
               alert("SUCCESS");
           },
           onerror : function(e) {
               alert("FAIL");
           },
           timeout:5000
       });
       client.open('POST', url);
       client.send({files:Ti.Filesystem.getFile('textfile.txt').read()});
       
  3. Chris Barber 2014-03-27

    3_2_X_hybrid pull request: https://github.com/appcelerator/titanium_mobile/pull/5544
  4. Chris Barber 2014-03-27

    Style cleanup: Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5545 3_2_X_hybrid pull request: https://github.com/appcelerator/titanium_mobile/pull/5546
  5. Olga Romero 2014-05-29

  6. Chris Barber 2014-06-06

    [~oromero] You should be able to test/close this now.
  7. Olga Romero 2014-06-12

    Closing as fixed. Tested with: Appcelerator Studio, build: 3.3.0.20140611195 Titanium SDK, build:3.3.0.v20140612101712 Tested the above code in IE and got "SUCCESS" alert.

JSON Source