mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 18:04:32 +00:00
Fix text attachment MIME misclassification (#3628)
* Fix text file attachment detection * Add file attachment extraction tests
This commit is contained in:
@@ -40,7 +40,7 @@ export async function downloadTelegramFile(
|
||||
filePath: info.file_path,
|
||||
});
|
||||
// save with inbound subdir
|
||||
const saved = await saveMediaBuffer(array, mime, "inbound", maxBytes);
|
||||
const saved = await saveMediaBuffer(array, mime, "inbound", maxBytes, info.file_path);
|
||||
// Ensure extension matches mime if possible
|
||||
if (!saved.contentType && mime) saved.contentType = mime;
|
||||
return saved;
|
||||
|
||||
Reference in New Issue
Block a user