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(upload): returns broken downloadUrl #270

Merged
merged 1 commit into from
Mar 31, 2023
Merged

fix(upload): returns broken downloadUrl #270

merged 1 commit into from
Mar 31, 2023

Conversation

shcheklein
Copy link
Member

This code:

             self.auth.service.files()
                .insert(**param)
                .execute(http=self.http)

That is used here https://github.com/iterative/PyDrive2/blob/main/pydrive2/files.py#L678-L680

Started returning metadata object with download URL like this:

'downloadUrl': 'https://www.googleapis.com/drive/v2/files/16USPEjsYg7WEL3J62p4N4TRE5_ZMr3SW?alt=media&source=downloadUrl'

That was breaking the download content later that is relying on the downloadUrl here:

https://github.com/iterative/PyDrive2/blob/main/pydrive2/files.py#L476

And it's visible in the tests, e.g. here: #269

I hope it's a temporary patch and it will be fixed upstream soon. It might be related to the deprecated v2 of the API which we don't have capacity at the moment to fix :(

@shcheklein shcheklein temporarily deployed to internal March 31, 2023 04:51 — with GitHub Actions Inactive
@shcheklein shcheklein self-assigned this Mar 31, 2023
@shcheklein shcheklein added bug Something isn't working priority-p1 priority-p0 and removed priority-p1 labels Mar 31, 2023
@shcheklein shcheklein requested a review from efiop March 31, 2023 04:53
@shcheklein
Copy link
Member Author

@iterative/dvc gentle ping. Please review and approve if this looks reasonable.

pydrive2/apiattr.py Outdated Show resolved Hide resolved
@shcheklein shcheklein temporarily deployed to internal March 31, 2023 15:24 — with GitHub Actions Inactive
@shcheklein shcheklein merged commit e9a98e9 into main Mar 31, 2023
@shcheklein shcheklein deleted the fix-upload branch March 31, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-p0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants