next.js/test/e2e/app-dir/actions/account-for-overhead.js
account-for-overhead.js12 lines353 B
/**
 * This function accounts for the overhead of encoding the data to be sent
 * over the network via a multipart request.
 *
 * @param {number} megaBytes
 * @returns {number}
 */
export function accountForOverhead(megaBytes) {
  // We are sending {megaBytes} - 5% to account for encoding overhead
  return Math.floor(1024 * 1024 * megaBytes * 0.95)
}
Quest for Codev2.0.0
/
SIGN IN