signal-golang / textsecure

TextSecure(signal) client package for Go
GNU General Public License v3.0
57 stars 26 forks source link

Upload attachment v3 #63

Closed Blackoverflow closed 1 year ago

Blackoverflow commented 1 year ago

I tried to implement upload attachment v3 without being resumable. Maybe that's what v2 is. :shrug:

Its now a three step process.

  1. fetch attributes for attachment upload getAttachmentV3UploadAttributes() 1.1. The signed upload location (that is some location on cdn2.signal.org with credentials encoded into the url) 1.2 A map of headers needed for that call 1.3 Some other unneeded infos
  2. make an empty post on that location with those headers, retrieve "location" from the response header getResumableUploadUrl()
  3. put the attachment on the retrieved location uploadToCdn2()

All three steps are working.

Additionally the type of the remoteId (formally known as CdnId) was changed from Long to String. Its now called CdnKey.

I could successfully send a voice message. :partying_face: