parley-messaging / ios-library

Parley iOS app library
MIT License
2 stars 2 forks source link

Can not upload bigger images; #56

Closed mat1th closed 7 months ago

mat1th commented 8 months ago

Describe the bug I'm trying the demo app that is included in the project. I've found a issue with uploading images.

To Reproduce

  1. Start the example app.
  2. Open a new chat.
  3. Upload a small image. (for example a image from ~5 KB)
  4. See that uploading the image does work. (Checkmark shown that image is send)
  5. Upload 1 of the default images of the iOS simulator.
  6. See that upload is failed. (Cross icon shown on image that you tried to upload).

Expected behaviour I do expect that the SDK allows uploading all kinds of sizes of images, and if the image is to bit it will give me an error before uploading, or at least give me the reason why my image could not been uploaded.

Screenshots screenshot_image_failed

Additional context The backed does give me the following response on the image I did try uploading:

{
  "notifications": [
    {
      "type": "error",
      "message": "invalid_media_type"
    }
  ],
  "status": "ERROR",
  "metadata": {
    "values": {
      "url": "media"
    },
    "method": "post",
    "duration": 0.011
  }
}

and the status code is: 400.

alexkok commented 8 months ago

Thanks for reporting and the clear description @mat1th ! We will look into it and check how we'll resolve this.

alexkok commented 7 months ago

Released in 3.9.1 🚀