fix(storage): Fix Resume() to use append_object_spec instead of write_object_spec for resumed appendable uploads by shubham-up-47 · Pull Request #15558 · googleapis/google-cloud-cpp
This PR corrects the logic in AsyncWriterConnectionResumedState::Resume() where it incorrectly assumed initial_request_ would always contain an write_object_spec. This assumption fails when resuming an upload that was initiated with ResumeAppendableObjectUpload, which uses append_object_spec, which leads to passing the bucket and object names empty.
The fix introduces a check to determine whether initial_request_ contains a write_object_spec or an append_object_spec, and then correctly extracts the bucket and object names from the available spec. This approach aligns with the pattern already used in WriteResultFactory for handling these two types of specifications.