easemob / react-native-chat-sdk

MIT License
2 stars 10 forks source link

Attachment is not sending #23

Closed Shweta-UMR closed 1 year ago

Shweta-UMR commented 1 year ago

Description

Hello everyone, I am sending image with createImageMessage but receiving following error. code 401: File not exits or can not be read. please help me

Version

1.0.11

Output of npx react-native info

0.68.2

Steps to reproduce

  1. Select image using react native image picker.
  2. Send filepath of respose to createImageMessage

Snack, code example, screenshot, or link to a repository

my filepath returns _file:///data/user/0/com.astrornmobileapp/cache/rn_image_picker_lib_tempcc6a3f5d-833d-4260-80cb-9c043498a6e2.jpg as filepath so i send same for filepPath prop still it is showing file not exists or can not be used

Platform

SimulatorOrDevice

iOSVersion

AsteriskZuo commented 1 year ago

file:///data/user/0/com.astrornmobileapp/cache/rn_image_picker_lib_temp_cc6a3f5d-833d-4260-80cb-9c043498a6e2.jpg modify to /data/user/0/com.astrornmobileapp/cache/rn_image_picker_lib_temp_cc6a3f5d-833d-4260-80cb-9c043498a6e2.jpg

AsteriskZuo commented 1 year ago

A piece of good advice: when you encounter a problem, you can refer to demo to see how it is solved and whether it can provide help.

lasitha-ideabits commented 1 year ago

@AsteriskZuo Please add this to the chat SDK Documentation as expected format Thanks