Driftt / drift-sdk-ios

Drift for iOS, for integrating Drift into your iOS application.
http://www.drift.com
MIT License
12 stars 17 forks source link

Download attachment file issue #86

Closed fplsv closed 5 years ago

fplsv commented 5 years ago

Hello.

I've noticed that download file attachment has been probably updated on backend part or something else happened, but URLStore creates a link via downloadAttachmentFile using access_token as query param which is not supported on the backend side.

{
  "key": "BadRequest",
  "status": "error",
  "message": "access_token is not supported as a query string param",
  "RequestId": "drift....",
  "errors": []
}

The downloaded file becomes invalid which affects QLPreviewController (the controller is not able to display image nor share) via DriftPreviewItem

There's a fix, but you could probably figure it out much better.

Request should be done using Authorization : Bearer (access_token) inside http headers.