Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly define array - not multidimensional array #136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhitesma
Copy link

I was going crazy today trying to figure out why I was getting 0 sized files on upload. Finally I noticed that I had based my work on this sample code I found on this page: https://developers.google.com/drive/api/guides/manage-uploads and the array of parameters was being doubly defined creating a multidimensional array instead of just passing parameters.

Removing either the array() or the [] around the array elements solves the problem. I'm not sure which is the preferred coding style for this project as I see several other sample files that are also using both methods of defining an array.

I also see that the 'fields' parameter is being passed - but the API docs don't show that as a paramter for the create endpoint. https://developers.google.com/drive/api/v3/reference/files/create so it appears that isn't needed either unless the api reference is out of date.

@jhitesma jhitesma changed the title Correctly define array - not multidimensional array fix: Correctly define array - not multidimensional array Sep 27, 2022
@conventional-commit-lint-gcf
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants