Skip to content
Snippets Groups Projects
Unverified Commit 8014abd3 authored by pierre-lehnen-rc's avatar pierre-lehnen-rc Committed by GitHub
Browse files

Revert importer streamed uploads (#16465)

parent 19322543
No related branches found
No related tags found
No related merge requests found
import https from 'https';
import http from 'http';
import { Duplex } from 'stream';
import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
......@@ -141,15 +140,8 @@ export class PendingFileImporter extends Base {
res.on('end', Meteor.bindEnvironment(() => {
try {
const duplex = new Duplex();
for (const chunk of rawData) {
duplex.push(Buffer.from(chunk));
}
duplex.push(null);
// Bypass the fileStore filters
fileStore._doInsert(details, duplex, function(error, file) {
fileStore._doInsert(details, Buffer.concat(rawData), function(error, file) {
if (error) {
completeFile(details);
logError(error);
......
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