Please allow *.ts and .mts files for uploading in AI Studio

When I try to upload a *.mts file in AI Studio, it gives a 500 error. If I rename it to use a *.txt extension, it succeeds.

The *.ts extension is the extremely well known standard for TypeScript. The *.mts is the more recent extension that indicates ES modules, the standard of JavaScript modules going forward (as opposed to CommonJS). Per TypeScript’s documentation:

  • .mts/.mjs/.d.mts files are always ES modules.
  • .cts/.cjs/.d.cts files are always CommonJS modules.
  • .ts/.tsx/.js/.jsx/.d.ts files are ES modules if the nearest ancestor package.json file contains "type": "module", otherwise CommonJS modules.

So please add the *.mts to the whitelist of files in AI Studio’s “Upload file” workflow. (This is the only type that I personally need, but it may behoove you to add the other filetypes listed in that documentation.)

Thank you!

1 Like

Yeah super frustrating you can’t upload files from a Node.JS backend and React front end which is extremely common. It is like they are forcing you out of vibe coding and I have to copy and paste file contents.

1 Like

I feel you on the frustrating part. But it’s a great free service that they’re providing and they’re just not able to get to everything. If you’re looking for vibe coding on new projects, it might be worth it to you to check out their google canvas offering. I personally am using Project IDX, though the AI model isn’t as customizable so I end up copy/pasting with AI Studio still.

I am edging closer and closer though to my own agentic-based IDE “Modified by Moderator” (not based on vscode or git), but it’s still 6-12 months away.