added auto scroll, fixed stt for voice messages, fixed get answers in chat, hope fixed attachments

This commit is contained in:
2026-03-29 11:56:13 +02:00
parent f1f297b3a7
commit 8fb95b884f
15 changed files with 51 additions and 16 deletions
+7 -4
View File
@@ -17,6 +17,7 @@ import {
import DocumentPicker, {
DocumentPickerResponse,
} from 'react-native-document-picker';
import RNFS from 'react-native-fs';
// --- Typen ---
@@ -74,15 +75,17 @@ const FileUpload: React.FC<FileUploadProps> = ({ onFileSelected, onCancel }) =>
setLoading(true);
try {
// In Produktion: Datei lesen und zu Base64 konvertieren
// const base64 = await RNFS.readFile(selectedFile.fileCopyUri || selectedFile.uri, 'base64');
const base64Placeholder = '';
// Datei lesen und zu Base64 konvertieren
const filePath = selectedFile.fileCopyUri || selectedFile.uri;
// URI-Schema entfernen fuer RNFS (file:// → absoluter Pfad)
const cleanPath = filePath.replace('file://', '');
const base64 = await RNFS.readFile(cleanPath, 'base64');
const fileData: FileData = {
name: selectedFile.name || 'unbenannt',
type: selectedFile.type || 'application/octet-stream',
size: selectedFile.size || 0,
base64: base64Placeholder,
base64,
uri: selectedFile.uri,
};