From ba22e56262d6761f3fbd25652b906c3c9802bf92 Mon Sep 17 00:00:00 2001 From: Amir Mohammad Saied Date: Sat, 11 Aug 2012 00:47:51 +0430 Subject: [PATCH] Conform to W3C File API Replace WebKitBlobBuilder with Blob() interface implementation of web browser. Make it working on Firefox as well. Change-Id: I3b7e677413dbba3aff6b3f3d239f56af07464ab8 --- server/camlistored/ui/camli.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/camlistored/ui/camli.js b/server/camlistored/ui/camli.js index 6d63fa3b9..5e39bf979 100644 --- a/server/camlistored/ui/camli.js +++ b/server/camlistored/ui/camli.js @@ -241,12 +241,12 @@ function camliUploadFileHelper(file, contentsBlobRef, opts) { function camliUploadString(s, opts) { opts = saneOpts(opts); var blobref = "sha1-" + Crypto.SHA1(s); + var parts = [s]; - bb = new WebKitBlobBuilder(); - bb.append(s); + var bb = new Blob(parts); var fd = new FormData(); - fd.append(blobref, bb.getBlob()); + fd.append(blobref, bb); var uploadCb = {}; uploadCb.success = function(resj) {