Closed les-kasa-1010 closed 4 years ago
Upload requests need some additional headers that are not required for other requests to the Google Photos Library API.
You can find out more in the developer guides here: https://developers.google.com/photos/library/guides/upload-media#uploading-bytes
I had the same question while skimming through the codelab.
I think the problem in the codelab is that the request is made with await authHeaders
instead of the headers
variable that includes those additional headqers (line 15 in codelab or https://github.com/googlecodelabs/photos-sharing/blob/final/lib/photos_library_api/photos_library_api_client.dart#L165 in app repo).
Do you need these lines?
Because you are using "await _authHeaders" for "headers" parameter, I don't think those lines are necessary.