|
@@ -121,12 +121,19 @@ const AttachmentsModal = () => {
|
|
|
allowMultiSelection: false
|
|
|
});
|
|
|
|
|
|
- const file = {
|
|
|
+ let file = {
|
|
|
uri: res[0].uri,
|
|
|
name: res[0].name,
|
|
|
type: res[0].type
|
|
|
};
|
|
|
|
|
|
+ if ((file.name && !file.name.includes('.')) || !file.type) {
|
|
|
+ file = {
|
|
|
+ ...file,
|
|
|
+ type: file.type || 'application/octet-stream'
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
if (chatData.onSendFile) {
|
|
|
chatData.onSendFile([file]);
|
|
|
}
|