Fixed attachments

This commit is contained in:
jeffser
2024-08-30 14:12:01 -06:00
parent df2a9d7b26
commit 69eaa56240
2 changed files with 3 additions and 1 deletions

View File

@@ -159,7 +159,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
if self.model_manager.verify_if_image_can_be_used():
attached_images.append(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))
else:
attached_files[name] = content['type']
attached_files[os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name)] = content['type']
if not os.path.exists(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id)):
os.makedirs(os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id))
shutil.copy(content['path'], os.path.join(self.data_dir, "chats", current_chat.get_name(), message_id, name))