Document why key comes first

This commit is contained in:
Daniel Gasienica 2018-03-07 14:50:32 -05:00
parent 0810ea6909
commit 710701d0fc

View file

@ -26,8 +26,8 @@ exports.upload = async (content) => {
const { fields, url } = signedForm.body;
const form = new FormData();
// The API expects `key` to be the first field:
form.append('key', fields.key);
Object.entries(fields)
.filter(([key]) => key !== 'key')
.forEach(([key, value]) => {