Documentation
Coding Studio

File Upload

Upload code files directly into Coding Studio using drag-and-drop or click-to-browse. Automatic language detection included.

Supports 18+ programming languages

Overview

File Upload lets you quickly load code files into Coding Studio without manual copy-pasting. Simply drag a file onto the editor or click the upload button to browse your filesystem. The language is automatically detected from the file extension.

Drag & Drop

Drag any code file directly onto the editor. A visual overlay confirms you're in the drop zone, and the file loads instantly.

Click to Browse

Click the Upload button in the header to open your system file picker and select a file.

Auto Language Detection

The programming language is automatically detected from the file extension. Syntax highlighting updates instantly.

How to Use

1

Drag & Drop Method

Drag a code file from your desktop or file explorer directly onto the editor panel. You'll see a blue overlay with "Drop your file here" — release to load the file.

2

Upload Button Method

Click the Upload button (file icon) in the input panel header. Select a file from your system — it loads immediately into the editor.

3

Verify Language

Check the language badge in the header. If auto-detection picked the wrong language, click the badge to manually select the correct one.

4

Run Your Tool

With your file loaded, select a tool (Explain, Debug, Refactor, etc.) and click the action button to analyze your code.

Supported File Extensions

File Upload supports 18+ programming languages with automatic detection based on file extension:

LanguageExtensions
JavaScript.js, .mjs, .cjs
TypeScript.ts, .tsx, .mts, .cts
Python.py, .pyw
Go.go
Rust.rs
Java.java
C#.cs
PHP.php
Ruby.rb
Swift.swift
Kotlin.kt, .kts
SQL.sql
HTML.html, .htm
CSS.css, .scss, .sass, .less
JSON.json
YAML.yaml, .yml
Markdown.md, .mdx
Shell.sh, .bash, .zsh

File Size Limits

To ensure optimal performance and fast processing:

Maximum File Size: 50KB

Files larger than 50KB will be rejected with an error message. For large files, copy the specific function or section you want to analyze.

Best Practice for Large Files

Instead of uploading entire large files, focus on specific functions, classes, or modules. This produces better results and uses fewer tokens. Most code analysis tasks work best with focused, self-contained snippets.

Uploaded File Badge

When you upload a file, a badge appears in the input panel header showing the filename. This helps you track which file you're working with.

Quick Clear

Click the × button on the badge to clear the uploaded file and reset the editor. Auto-detect mode is re-enabled so you can paste new code or upload a different file.

Error Handling

If something goes wrong during upload, you'll see a clear error message:

  • File too large: The file exceeds the 50KB limit. Try a smaller file or copy specific sections.
  • Failed to read file: The file couldn't be read. Try again or use a different file format.
  • Unknown extension: The file type isn't recognized. The code will load as plain text — select the language manually.

Error Messages Auto-Dismiss

Error messages automatically disappear after 3 seconds. If you miss the message, try the upload again to see the error.

Workflow Tips

  • Quick iterations: Upload a file, analyze it, make changes locally, then upload again
  • Compare files: Upload one file, copy the results, then upload another to compare
  • Mixed workflow: Upload a file as a starting point, then edit directly in the browser
  • Test files: Upload your source code to the Generate tool, then upload test files to debug issues