Document workaround for got
FormData
bug
See: https://github.com/sindresorhus/got/pull/466
This commit is contained in:
parent
710701d0fc
commit
b049412bfd
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@ const BASE_URL = 'https://debuglogs.org';
|
|||
// Workaround: Submitting `FormData` using native `FormData::submit` procedure
|
||||
// as integration with `got` results in S3 error saying we haven’t set the
|
||||
// `Content-Length` header:
|
||||
// https://github.com/sindresorhus/got/pull/466
|
||||
const submitFormData = (form, url) =>
|
||||
new Promise((resolve, reject) => {
|
||||
form.submit(url, (error) => {
|
||||
|
@ -42,6 +43,8 @@ exports.upload = async (content) => {
|
|||
filename: 'signal-desktop-debug-log.txt',
|
||||
});
|
||||
|
||||
// WORKAROUND: See comment on `submitFormData`:
|
||||
// await got.post(url, { body: form });
|
||||
await submitFormData(form, url);
|
||||
|
||||
return `${BASE_URL}/${fields.key}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue