googleapis / googleapis/google-api-nodejs-client
Ability to specify filename for analytics.management.uploads.uploadData
- Dominant language
- TypeScript
- Stars
- 12.2k
- Forks
- 2k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 24
Description
**Is your feature request related to a problem? Please describe.**
I would like to specify the filename for uploads to a Google Analytics custom Data Set ([docs](https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtReference/management/uploads/uploadData)). Currently this does not seem to be possible using the Node client. All uploads appear with the name "Unknown Filename".
**Describe the solution you'd like**
Pass the filename in one of the params to the uploadData method, such as:
```javascript
analytics.management.uploads.uploadData({
accountId: '111111111',
customDataSourceId: 'aaaaaaaaaaaa',
webPropertyId: 'UA-111111111-1',
requestBody: {
title: "My Filename Here" // <-- NEW PART
},
media: {
mimeType: 'application/octet-stream',
body: myReadableStream,
},
})
```
**Describe alternatives you've considered**
I can't imagine any alternatives.
**Additional context**
Debugged a bit with Justin. Relevant code seems to be [here](https://github.com/googleapis/nodejs-googleapis-common/blob/master/src/apirequest.ts#L258). We know the `requestBody` param is being correctly received as `resource` there. But neither `title` nor `name` in the requestBody seems to work. Apparently the discovery doc is lacking type information for this param. The underlying endpoint does seem to work correctly for via the Python client or Browser Javascript examples.
Thank you!!
Contributor guide
Assessment
This issue has not been assessed yet.