-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.
Description
Hi,
the code in the HttpRequest.__init__ is useless:
# Pull the multipart boundary out of the content-type header.
major, minor, params = mimeparse.parse_mime_type(
self.headers.get('content-type', 'application/json'))And it prevents from storage.insert creating explicit dirs without content-type. I.e. this code pass only with the above code removed:
api = googleapiclient.discovery.build('storage', 'v1', credentials=credentials)
media = googleapiclient.http.MediaIoBaseUpload(io.BytesIO(b''), '')
resp = api.objects().insert(bucket=bucket, name='testdir/', media_body=media).execute()BTW similar code with empty contentType works on the .NET client, too.
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.triage meI really want to be triaged.I really want to be triaged.