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!