Google Drive Replace File uploadType param

Hi, the Google Drive Replace File connector is great, but it fails if the request is larger than 5MB. In order to submit files larger than this, you have to specify the uploadType parameter. This parameter isn’t part of the standard config/fields provided by the Pipedream UI, would be nice if it was added (or even just create the ability to add as many custom params as necessary)

Hi @noahlocke-uw

Appreciate the feedback! That’s a good point, but I’m glad you found the build in uploadType parameter to increase upload size.

There’s another option if you have control over the requesting payload, you can add pipedream_upload_body=1 as a query param too:

Alternatively sending a header x-pd-upload-body: 1 will achieve the same large payload support.

@pierce we are using the pipedream_upload_body=1 parameter in our request payload already, which is great, but our Workflow fails on the Google Drive Replace File step because Google is rejecting the request as it’s too large.

If Pipedream is unable to address this issue, could I request that you add to the documentation for this connector this limitation?

Also, in our use case, the file we are attempting to upload to Google Drive is 6.8MB… seems like the Pipedream Google Drive Replace File componenent should be able to handle a file of that size

Hi @noahlocke-uw thanks for your patience while I looked into the Google Drive documentation, I understand what you mean by the uploadType prop not being present in the Replace File action now.

For files over 5mb’s Google Drive’s API requires uploadType=media.

Here’s the issue you can track on our Github board for real time updates:

1 Like

@pierce I see that issue #3602 is closed, however the error in the Google Drive Replace File component is not fixed.

Hi @noahlocke-uw did you update your action to the latest version? It should be v0.0.5 under the step details I believe.

The action should automatically detect if the given file is over 5 megabytes then use the correct uploadType parameter:

Can you share an example file that didn’t work?

I deleted the old step and added it again… it still shows v0.0.4

When I look at the source code for this step, no changes were made (the actual fix was made to components/google_drive/actions/upload-file/upload-file.mjs)

The step I’m using is Google Drive Replace File (see the original ticket descritption): pipedream/replace-file.mjs at master · PipedreamHQ/pipedream · GitHub

Thanks for confirming @noahlocke-uw

I’ve opened another bug report for our developers to look into:

Subscribe to that for real time updates, hopefully it’s a simple fix!

@pierce not sure what I’m doing wrong now. I see the PR was merged and have upgraded the Replace File component to v0.0.5, still getting the same error even when using the “resumable” upload type parameter.

@noahlocke-uw hmm that is strange, you’d think QA would have picked on that. Maybe their acceptance criteria was different than your scenario?

Can you please share an example of a file that was giving you this error? That would help us fix the bug permanently. Feel free to comment on the bug thread here:

The file I’m uploading is a plain-text request body csv. It’s approximately 7.5MB in size. I’m using the Pipedream upload for large files, so it’s first uploaded to AWS S3 and then I pass the temporary URL to the Replace File action. I can confirm that if I do the exact same Workflow with a file less than 5MB it works flawlessly. I’m still getting the “Request Too Large” error.