Hi @dennisedson ,
I am submitting form data to the api because it is a “multipart/form-data” so here is the best I can do.
FormData object:
{
file: <buffer>,
fileName: <string>,
options:
{
access: "PUBLIC\_INDEXABLE",
ttl: "P3M",
overwrite: false,
duplicateValidationStrategy: "NONE",
duplicateValidationScope: "ENTIRE\_PORTAL",
}
}
From Axios request:
url: ‘/files/v3/files’,
method: 'post',
data: FormData {
\_overheadLength: 425,
\_valueLength: 4297,
\_valuesToMeasure: \[],
writable: false,
readable: true,
dataSize: 0,
maxDataSize: 2097152,
pauseStreams: true,
\_released: true,
\_streams: \[],
\_currentStream: **null**,
\_insideLoop: false,
\_pendingNext: false,
\_boundary: '\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-264236909180776376341869',
\_events: \[Object: null prototype],
\_eventsCount: 1
},
headers: {
Accept: 'application/json, text/plain, \*/\*',
'Content-Type': 'multipart/form-data; boundary=\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-264236909180776376341869',
Authorization: 'Bearer \<valid oauth token>',
'User-Agent': 'axios/0.21.1'
},
baseURL: 'https://api.hubapi.com/',