Uh oh!
There was an error while loading. Please reload this page.
Pass 'user_project' if set for blob downloads w/ 'mediaLink' set - #3500
Conversation
| if self.media_link is None: | ||
| download_url = _DOWNLOAD_URL_TEMPLATE.format(path=self.path) | ||
| base_url = _DOWNLOAD_URL_TEMPLATE.format(path=self.path) | ||
| scheme, netloc, path, query, frag = urlsplit(base_url) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| query.append(('generation', '{:d}'.format(self.generation))) | ||
| else: | ||
| return self.media_link | ||
| scheme, netloc, path, query, frag = urlsplit(self.media_link) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| query = parse_qsl(query) | ||
| if self.user_project is not None: | ||
| query.append(('userProject', self.user_project)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| scheme, netloc, path, query, frag = urlsplit(base_url) | ||
| query = parse_qsl(query) | ||
| # Only add `generation' for synthesized URLs: 'mediaLink' from | ||
| # server presumably already encodes it. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
| def test__get_download_url_with_media_link(self): | ||
| blob_name = 'something.txt' | ||
| bucket = mock.Mock(spec=[]) | ||
| bucket = _Bucket(name='IRRELEVANT') |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Jun 19, 2017
@lukesneeringer, @dhermes OK to merge? |
Fixes an oversight in #3495: server-set
mediaLinktriggers a separate branch when computing download URL.Toward #3474.