Skip to content

Commit 2118bd0

Browse files
committed
Get hosted files as byte array
1 parent 081cffa commit 2118bd0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/controllers/project.controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ function addFileToZip(file, files, zip, path = '') {
239239
});
240240
} else if (file.url) {
241241
axios
242-
.get(file.url)
242+
.get(file.url, {
243+
responseType: 'arraybuffer'
244+
})
243245
.then(({ data }) => {
244246
zip.file(`${path}${file.name}`, data);
245247
resolve();

0 commit comments

Comments
 (0)