Skip to content

Commit b509838

Browse files
authored
fix: upload large payload for cache (#61)
1 parent cf75458 commit b509838

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugins/builds.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ exports.plugin = {
105105
}
106106
});
107107

108-
// For text/plain payload, upload it as Buffer
109-
if (contents.h['content-type'] === 'text/plain') {
108+
// For text/plain payload or application/zip, upload it as Buffer
109+
// Otherwise, catbox-s3 will try to JSON.stringify (https://github.com/fhemberger/catbox-s3/blob/master/lib/index.js#L236)
110+
// and might create issue on large payload
111+
if (contents.h['content-type'] === 'text/plain' ||
112+
contents.h['content-type'] === 'application/zip') {
110113
value = contents.c;
111114
}
112115

0 commit comments

Comments
 (0)