Skip to content

Commit

Permalink
bumped max axios body size to 95 MB
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgtho committed Jul 13, 2022
1 parent d0d43da commit 6c8b957
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const path = require('path')
const { ARCHIVE_URL, ARCHIVE_KEY, FILE_FORMATS } = require('../config')
const { createTask, createJob } = require('./e18')

const maxBodyLength = 99000000 // maxBodyLength is 10 MB as default from axios/follow-redirects - overriding to 99 MB (Azure function has limit of 100 MB)

const verifyExt = (ext) => {
const valid = FILE_FORMATS.includes(ext.toLowerCase()) || FILE_FORMATS.includes(ext.toUpperCase())
return valid
Expand Down Expand Up @@ -38,7 +40,8 @@ const callArchive = async (payload, e18JobId, e18TaskId, endpoint) => {
'Ocp-Apim-Subscription-Key': ARCHIVE_KEY,
e18JobId,
e18TaskId
}
},
maxBodyLength
}

const { data } = await axios.post(`${ARCHIVE_URL}/${endpoint}`, payload, headers)
Expand Down

0 comments on commit 6c8b957

Please sign in to comment.