I can’t seem to upload this file to the files endpoint even after renaming the file to TXT or TS and I keep getting
Error code: 400 - {'error': {'message': "Invalid file format. Supported formats: ['c', 'cpp', 'csv', 'docx', 'html', 'java', 'json', 'md', 'pdf', 'php', 'pptx', 'py', 'rb', 'tex', 'txt', 'css', 'jpeg', 'jpg', 'js', 'gif', 'png', 'tar', 'ts', 'xlsx', 'xml', 'zip']", 'type': 'invalid_request_error', 'param': None, 'code': None}}
I’m uploading the following file:
import { cn } from "@/lib/utils";
const Border = ({ children, className, ...props }: any) => {
return (
<div
className={cn("border rounded-xl border-zinc-700 mb-4 p-6", className)}
{...props}
>
{children}
</div>
);
};
export default Border;
Is the language auto-inferred based on the contents? This is frustrating since we’re building an app for AI code modification.