Bug 1348691 - fix Box.com filelink uploads (esr52 version). r+a=me DONTBUILD
authorJorg K
Thu, 04 May 2017 16:01:41 +0200
changeset 27881 b8034a160796
parent 27880 18a456796cf1
child 27882 58e8a5cb89d5
push id1892
push usermozilla@jorgk.com
push dateThu, 04 May 2017 14:05:09 +0000
treeherdercomm-esr52@b8034a160796 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1348691
Bug 1348691 - fix Box.com filelink uploads (esr52 version). r+a=me DONTBUILD
mail/components/cloudfile/nsBox.js
--- a/mail/components/cloudfile/nsBox.js
+++ b/mail/components/cloudfile/nsBox.js
@@ -774,17 +774,17 @@ nsBoxFileUploader.prototype = {
       if (this.callback)
         this.callback(this.requestObserver,
                       Ci.nsIMsgCloudFileProvider.uploadErr);
     }.bind(this);
 
     req.setRequestHeader("Authorization", "Bearer " + this.box._oauth.accessToken);
 
     // Encode the form.
-    let file = new File(this.file);
+    let file = File.createFromNsIFile(this.file);
     let form = Cc["@mozilla.org/files/formdata;1"]
                  .createInstance(Ci.nsIDOMFormData);
     form.append("filename", file, this.file.leafName);
     form.append("parent_id", this.box._cachedFolderId);
 
     req.send(form);
   },