ipfs storage for images and other nontext items. for use with etica - runs on etica network and currencys
https://collect.etica-stats.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
540 B
19 lines
540 B
'use strict'; |
|
|
|
import utils from '../utils.js'; |
|
import toFormData from './toFormData.js'; |
|
import platform from '../platform/index.js'; |
|
|
|
export default function toURLEncodedForm(data, options) { |
|
return toFormData(data, new platform.classes.URLSearchParams(), { |
|
visitor: function(value, key, path, helpers) { |
|
if (platform.isNode && utils.isBuffer(value)) { |
|
this.append(key, value.toString('base64')); |
|
return false; |
|
} |
|
|
|
return helpers.defaultVisitor.apply(this, arguments); |
|
}, |
|
...options |
|
}); |
|
}
|
|
|