Skip to content
Snippets Groups Projects
Commit 34b894d2 authored by Jared Hancock's avatar Jared Hancock
Browse files

upload: Reduce file processing client-side

parent 3da71de4
No related branches found
No related tags found
No related merge requests found
...@@ -451,7 +451,7 @@ ...@@ -451,7 +451,7 @@
opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); }); opts.beforeSend(files[fileIndex], fileIndex, function () { send(e); });
}; };
reader.readAsDataURL(files[fileIndex]); reader.readAsBinaryString(files[fileIndex]);
} else { } else {
filesRejected++; filesRejected++;
...@@ -498,7 +498,7 @@ ...@@ -498,7 +498,7 @@
xhr.withCredentials = opts.withCredentials; xhr.withCredentials = opts.withCredentials;
} }
var data = atob(e.target.result.split(',')[1]); var data = e.target.result;
if (typeof newName === "string") { if (typeof newName === "string") {
builder = getBuilder(newName, data, mime, boundary); builder = getBuilder(newName, data, mime, boundary);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment