Skip to content

Commit c053e9d

Browse files
davimacedodplewis
authored andcommitted
Fix GraphQL file upload (parse-community#5944)
1 parent 6d63a2b commit c053e9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GraphQL/loaders/filesMutations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ const load = parseGraphQLSchema => {
2727
if (createReadStream) {
2828
const stream = createReadStream();
2929
data = await new Promise((resolve, reject) => {
30-
let data = '';
30+
const chunks = [];
3131
stream
3232
.on('error', reject)
33-
.on('data', chunk => (data += chunk))
34-
.on('end', () => resolve(data));
33+
.on('data', chunk => chunks.push(chunk))
34+
.on('end', () => resolve(Buffer.concat(chunks)));
3535
});
3636
}
3737

0 commit comments

Comments
 (0)