How to implement file attachment and file preview generation?
You can send file messages like this
const result = await kitty.sendMessage({
channel: channel,
file: file,
progressListener: {
onStarted: () => {
// Handle file upload started
},
onProgress: (progress) => {
// Handle file upload process
},
onCompleted: (result) => {
// Handle file upload completed
},
},
});
File messages have a URL you send can use to download and render the file.
-
Does the file upon receipt show only the url?
-
How is the file preview done?
-
Can you make a guide detailing its usage later on (as you get time)?
This branch has an example of how to implement file attachments GitHub - ChatKitty/chatkitty-example-react-native at multimedia