A powerful Tampermonkey userscript that adds true file upload capabilities to ChatGPT, enabling seamless file sharing and management within your conversations. Now with support for folder uploads and GitHub repository imports.
After getting frustrated with constantly copy-pasting code into ChatGPT to work with o1-pro, I built something that I think you'll find useful.
While ChatGPT's interface has evolved, it still lacks native file upload support for many models (e.g., o1-mini, o1, o1-pro). For GPT-4o users who have native file upload, this plugin provides a superior alternative by sending the complete file content directly in the conversation, bypassing ChatGPT's RAG-based file processing. This userscript provides:
- True file upload functionality (not just copy/paste)
- Direct file content transmission (no RAG processing for GPT-4o)
- Proper file parsing that ChatGPT understands
- Clean UI integration with the ChatGPT interface
- Syntax highlighting for code files
- Dark/Light theme support
- New: Upload entire folders
- New: Import files directly from GitHub repositories
- 📤 Direct File Upload: Upload files directly through ChatGPT's interface
- 📁 Folder Upload: Upload entire folders and manage their contents
- 🌐 GitHub Integration: Import files from GitHub repositories using a stepper-based flow
- 👀 Smart Preview: Preview files before sending, with syntax highlighting for code
- 🎨 Syntax Highlighting: Automatic language detection and highlighting for common file types
- 📝 Message Integration: Files appear neatly above your messages
- 🔍 Content Viewer: Modal viewer with download capability
- 🗑️ File Management: Easy file removal and management
- 🌓 Theme Support: Seamless integration with ChatGPT's light/dark themes
- 🔒 Local Processing: All file handling happens in your browser
- Install the Tampermonkey extension for your browser
- Click this installation link
- Confirm the installation in Tampermonkey
- Open ChatGPT
- Click the paper clip button next to the text input
- Select "Upload Files" or "Upload Folder" or "Upload from GitHub"
- Choose one or more files or folders
- Preview and manage your files
- Send your message as usual
- O1 Models: Adds file upload capability for o1-mini, o1, and o1-pro
- GPT-4o: Provides direct file content transmission, bypassing the default RAG-based file processing
- Code files (
.js
,.py
,.html
,.css
,.json
, etc.) - Text files (
.txt
,.md
) - And more...
Files are automatically formatted in XML for optimal ChatGPT processing:
<user_attachments>
<attachment name="example.js" last_edit="2024-03-20 15:30:00" size="1.2 KB">
console.log("Hello, World!");
</attachment>
</user_attachments>
- Import files from any public GitHub repository
- Use a stepper-based flow to select files and folders
- Upload multiple files or entire folders at once for batch processing
- Use the preview feature to verify file contents
- Files can be downloaded from the preview modal
- Remove files easily before sending if needed
- Use the GitHub import feature to quickly bring in code from repositories
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
MIT License - feel free to use and modify as needed.
- ChatGPT for the platform
- Tampermonkey for making userscripts possible
- Prism.js for syntax highlighting