-
Notifications
You must be signed in to change notification settings - Fork 697
Description
Problem Statement
The main issue here is that oftentimes users will simply modify .sql or .sh or other code like files (like.py files) to .txt as part of their uploads. However, it seems like there's some sort of MIME sniffing occurring on the Bedrock side that throws the following error, even if you set the document type to "txt".
'An unexpected error occurred. Please try again.', 'exception': 'An error occurred (ValidationException) when calling the ConverseStream operation: Unsupported MIME type: application/x-bat. Retry your request with a supported file type: xlsx, txt, pdf, csv, md, doc, html, xls, docx'
Proposed Solution
Support explicit file types that are text like files, or perhaps some flag to treat the files as true text files if a user decides to change the extension.
Use Case
Often times user will upload such files to do code analysis or ask models to scan for security vulnerabilities.
Alternatives Solutions
No response
Additional Context
I recognize this is something that is likely in place on the Bedrock side as a security precaution, but considering that Amazon Q can more or less look at these types of files, it would be nice to allow Strands to act similarly with file uploads.